PHP to get the image of EXIF information, PHP with a exif_read_data function can be used to read the image of EXIF information, code from the PHP manual
<?php
echo "test1.jpg:<br/>\n";
$exif = Exif_read_data (' tests/test1.jpg ', ' IFD0 ');
Echo $exif ===false? "No Header Data found.<br/>\n": "Image contains headers<br/>\n";
$exif = Exif_read_data (' tests/test2.jpg ', 0, true);
echo "Test2.jpg:<br/>\n";
foreach ($exif as $key => $section) {
foreach ($section as $name => $val) {
echo $key. $name: $val <br/&G T;\n ";
}
}
? >
The output is as follows
Test1.jpg:
No header data found.
Test2.jpg:
FILE. FileName:test2.jpg
FILE. filedatetime:1017666176
FILE. filesize:1240
FILE. Filetype:2
FILE. Sectionsfound:any_tag, IFD0, THUMBNAIL, COMMENT
computed.html:width= "1" height= "1"
computed. Height:1
computed. Width:1
computed. Iscolor:1
computed. Byteordermotorola:1
computed. Usercomment:exif test image.
Computed. Usercommentencoding:ascii
computed. Copyright:photo (c) M.boerger, edited by M.boerger.
Computed. Copyright.Photographer:Photo (c) M.boerger
computed. Copyright.Editor:Edited by M.boerger.
IFD0. Copyright:photo (c) M.boerger
IFD0. Usercomment:ascii
THUMBNAIL. jpeginterchangeformat:134
THUMBNAIL. jpeginterchangeformatlength:523
comment.0:comment #1.
Comment.1:comment #2.
Comment.2:comment #3end
THUMBNAIL. jpeginterchangeformat:134
THUMBNAIL. Thumbnail.height:1
Thumbnail. Thumbnail.height:1
The above mentioned is the entire content of this article, I hope you can enjoy.