Login   Register  
PHP Classes
elePHPant
Icontem

File: exampleReader.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Vinay Yadav  >  phpExifRW  >  exampleReader.php  >  Download  
File: exampleReader.php
Role: Example script
Content type: text/plain
Description: Reading Example
Class: phpExifRW
EXIF information reader and writer
Author: By
Last change:
Date: 10 years ago
Size: 894 bytes
 

Contents

Class file image Download
<?php
/**
 * Example script showing usage of phpReader class
 *
 * Vinay Yadav < vinay@vinayras.com >
 
 * http://www.vinayras.com/project/phpexifrw.php 
 * http://www.sanisoft.com/phpexifrw/
 
 *
 * For more details on constants and methods look at the
 * documentation provided in doc/ folder
 *
 */

 
$filename "02280003.jpg";

 require(
"exifReader.inc");

 
/**
 * Create an object
 */
 
$er = new phpExifReader($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.
  */
 
echo "<pre>";
    
print_r($er->getImageInfo());
 echo 
"</pre>";

 
$time $er->getDiffTime();

 echo 
"<br>Read EXIF in $time seconds";

?>