- ini_set: documentation ( source)
- error_reporting: documentation ( source)
- file_put_contents: documentation ( source)
<?
ini_set('display_errors', 'On');
error_reporting(E_ALL);
// determine image format
print "1\n";
if (exif_imagetype('http://23mox.com/php/GoogleMapAPI/IMG_0266_mod.JPEG') == IMAGETYPE_JPEG) {
print "Hey, this is a JPEG image";
}
print "2";
// extra thumbnail from EXIF data, this sometimes help and you
// do not need to generate your own thumbnails, most digital
// cameras provide a thumbnail
$thumb_image = exif_thumbnail($original_file, $width, $height, $type);
print "Height: $height \nWidth: $width \nType: $type";
// save thumbnail to a file
file_put_contents($path_to_thumb_image,$thumb_image);
// read all available tags into an associative array
$exif_data = exif_read_data($original_file, 'ANY_TAG');
foreach ($exif_data as $key => $section_data) {
foreach ($section_data as $name => $val) {
print "$key.$name : $val \n";
}
}
?>