Location: PHPKode > projects > photolibrary > popup.exifdata.php
<?PHP
/*
   [Start: Program Information Header]

    Name    : Photolibrary: Photo EXIF data
    Purpose : Show raw EXIF data from a photo
    Syntax  : ?hash=hash

   [End: Program Information Header]

   [Start: Author Information Header]

    Name    : James D. Forrester
    E-mail  : hide@address.com

    Name    : Ed Sanders
    E-mail  : hide@address.com

   [End: Author Information Header]
*/

require('include.initialise.php');

$page_title = 'Photo exif data';


$no_menu = true;
include('include.menu.php');

$hash = getString('hash');

$query_handle = mysql_query("SELECT hash, type FROM photos WHERE hash='$hash'") or trigger_error(mysql_error(), E_USER_ERROR);
if($array = mysql_fetch_assoc($query_handle))
{
  extract($array);
  format_html('<div style="background-image: url(\''.$settings['thumbs_directory'].'/'.filename($hash).'.'.type($type).'\'); background-repeat: no-repeat; background-attachment: fixed; background-position: 98% 2%;">');

  if($exif_data = @exif_read_data($settings['originals_directory'].'/'.filename($hash).'.'.type($type)))
  {
    format_html('<pre>');
    print_r($exif_data);
    format_html('</pre>');
  }
  else
  {
    format_html('No EXIF data found');
  }
  format_html('</div>');
}
else
{
  format_html('Image not found.');
}

format_html('</body></html>');

mysql_close($dbserverlink);
?>
Return current item: photolibrary