Foroğraflarda EXIF bilgileri

PHP ile fotoğrafların EXIF bilgilerini yazdırmak.

Aşağıdaki PHP kodunu yazıyoruz:

<?php
$exif = exif_read_data('den_3230.jpg', NULL, true, true);
echo "<ul>";
foreach($exif as $key => $deger) { echo "<li>$key : </li><ul>"; 
foreach($deger as $key2 => $deger2) { echo "<li>$key2 : $deger2 </li>"; }
echo "</ul>";
}
echo "</ul>";
?>

Sonuç:

  • FILE :
    • FileName : den_3230.jpg
    • FileDateTime : 1490360648
    • FileSize : 1343098
    • FileType : 2
    • MimeType : image/jpeg
    • SectionsFound : ANY_TAG, IFD0, EXIF
  • COMPUTED :
    • html : width="1600" height="1064"
    • Height : 1064
    • Width : 1600
    • IsColor : 1
    • ByteOrderMotorola : 1
    • ApertureFNumber : f/5.0
  • IFD0 :
    • Make : NIKON CORPORATION
    • Model : NIKON D300
    • XResolution : 300/1
    • YResolution : 300/1
    • ResolutionUnit : 2
    • Software : Ver.1.03
    • DateTime : 2017:03:15 19:26:06
    • Artist : Picasa
    • YCbCrPositioning : 2
  • EXIF :
    • ExposureTime : 10/6400
    • FNumber : 50/10
    • ExposureProgram : 3
    • ISOSpeedRatings : 200
    • ExifVersion : 0221
    • DateTimeOriginal : 2009:07:29 17:46:08
    • DateTimeDigitized : 2009:07:29 17:46:08
    • ComponentsConfiguration :
    • CompressedBitsPerPixel : 4/1
    • ExposureBiasValue : 0/6
    • MaxApertureValue : 36/10
    • MeteringMode : 5
    • LightSource : 0
    • Flash : 0
    • FocalLength : 160/10

Mesela sadece Çekim Tarihi ni yazdırmak için:

<?php
$exif = exif_read_data('den_3230.jpg', NULL, true, true);
echo "Çekim tarihi: " .$exif["EXIF"]["DateTimeOriginal"];
?>