Example #1
0
function getEXIF()
{
    $er = new phpExifRW("../" . getFullImageURL());
    $er->processFile();
    $er->showImageInfo();
}
<?php

/**
 * Example script showing usage of phpExifRW class
 *
 * Vinay Yadav (vinayRas) < *****@*****.** >
 * http://www.sanisoft.com/phpexifrw/
 *
 * For more details on constants and methods look at the
 * documentation provided in doc/ folder
 *
 */
$filename = "02280003.jpg";
require "exif.inc";
$er = new phpExifRW($filename);
/*
 * Process the JPEG image
 */
$er->processFile();
/**
 * Generate a Link to view thumbnail.
 * showThumbnail.php files need to be in the same directory.
 */
if ($er->ThumbnailSize > 0) {
    echo "<br><img src='" . $er->showThumbnail() . "'>";
}
/**
 * Show the image details along with Exif information.
 */
$er->showImageInfo();
<?php

/**
 * Script to show thumbnail extracted from EXIF information of an JPEG Image
 *
 * Vinay Yadav (vinayRas) <*****@*****.**>
 * http://www.sanisoft.com/phpexifrw/
 *
 * Changes on 6-June-2003
 *
 */
header("Content-Type: image/jpeg");
$file = $_GET["file"];
$chacheFolder = dirname(__FILE__) . "/.cache_thumbs";
if (file_exists("{$chacheFolder}/{$file}")) {
    $fp = fopen("{$chacheFolder}/{$file}", "rb");
    $tmpStr = fread($fp, filesize("{$chacheFolder}/{$file}"));
    echo $tmpStr;
    exit;
}
/* assumed to get the filename with full path though GET method. */
require "exif.inc";
$er = new phpExifRW($file);
$er->processFile();
echo $er->getThumbnail();