Created
July 12, 2016 16:28
-
-
Save growdev/a056ec99f62a2d9cc076763f0c0eaad6 to your computer and use it in GitHub Desktop.
EXIF Data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo "START\n"; | |
$file_name ='IMG_2869.JPG'; | |
$exif = exif_read_data( $file_name, 'IDF0' ); | |
echo $exif===false ? "No header data found.<br />\n" : "Image contains headers<br />\n"; | |
$exif = exif_read_data( $file_name, 0, true ); | |
echo "$file_name:\n"; | |
//print_r( $exif ); | |
echo "TITLE: " . $exif['FILE']['FileName'] . "\n"; | |
echo "DATE : " . $exif['EXIF']['DateTimeOriginal'] . "\n"; | |
echo "END\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment