In most photos from digital cameras besides the actual image, there’s a little ”information block” call EXIF data. If you have the correct PHP extension installed on your server – the one called ”exif” – it’s pretty easy to read the EXIF data and display them, as you like.

1) Check if the extension is available?

$load_extensions = get_loaded_extensions();
if (!in_array(exif, $load_extensions )) {
echo "Exif is NOT available";
} else {
echo "Exif extension is available.";
};

other way is simple:

if (function_exists('exif_read_data')) { ... }

2) If you have the extension available, reading the data is a simple matter:

function get__exif__information($file) {
$exif = exif_read_data($file, 0, true);
return $exif;
}

get__exif__information ( path_to_image)
0 Shares:
Leave a Reply

Your email address will not be published. Required fields are marked *

2 + two =

This site uses Akismet to reduce spam. Learn how your comment data is processed.

You May Also Like

Pico – Flat-File CMS

Pico is an open source CMS application that is capable of very few things. It uses flat-files as the database and built with PHP. Simply, there is no setup and the app works instantly.

Easily create a Zip file using PHP

Creating .ZIP archives using PHP can be just as simple as creating them on your desktop. PHP's ZIP class provides all the functionality you need!

Fast, Effective PHP Compression With .htaccess

PHP compression is an excellent method of conserving bandwidth and reducing client download times. We have already discussed an excellent method for CSS compression, and in this article we share a super-easy technique for compressing all PHP content without editing a single file.