PHP – Display all jpg Image Infomation


Use the following PHP function, you can display all image information (EXIF data) for a particular jpg file.

<?php
echo "aladdin-sane.jpg:<br />\n";
$exif = exif_read_data('david-bowie/aladdin-sane.jpg', 'IFD0');
echo $exif===false ? "No header data found.<br />\n" : "Image contains headers<br />\n";

$exif = exif_read_data('david-bowie/aladdin-sane.jpg', 0, true);
echo "test2.jpg:<br />\n";
foreach ($exif as $key => $section) {
foreach ($section as $name => $val) {
echo "$key.$name: $val<br />\n";
}
}
?> 

Hope it helps!

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Technorati
  • Twitter
  • Yahoo! Bookmarks

  1. #1 by Bailey Singh on June 10, 2010 - 10:47 pm

    David Bowie has some really eccentric personality but i like his style of music. he is a good actor too.-~,

  2. #2 by Julia Mitchell on July 15, 2010 - 7:51 am

    when i hear about David Bowie, it reminds me of Vanilla Ice. ~’~

(will not be published)