<?
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";
}
}
?>
<?
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";
}
}
?>
1
Fatal error: Uncaught Error: Call to undefined function exif_imagetype() in /in/k2jni:8
Stack trace:
#0 {main}
thrown in /in/k2jni on line 8
Process exited with code 255.
Output for 5.5.0 - 5.5.35, 5.6.0 - 5.6.28
1
Fatal error: Call to undefined function exif_imagetype() in /in/k2jni on line 8
Process exited with code 255.