Skip to content

Commit

Permalink
Update index.php
Browse files Browse the repository at this point in the history
  • Loading branch information
fida02 committed Sep 5, 2020
1 parent 802597b commit 6620936
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php
// Php exif data extraction function
/*
|---------------------------------------------------------|
| EXIF DATA EXTRACTION FUNCTION |
|---------------------------------------------------------|
*/
function fidaExif() {
global $imagePath;

Expand Down Expand Up @@ -117,4 +121,30 @@ function fidaExif() {
$return['flash'] = $camFlashName;
return $return;
}
?>

/*
|---------------------------------------------------------|
| USE |
|---------------------------------------------------------|
*/

// Full URL of the image to read exif data
$imagePath = 'FULL_IMAGE_PATH'; // Chnage FULL_IMAGE_PATH with your image URL

// Run the function
$camera = fidaExif();

// Show the exif data
echo '<ul>';
echo '<li>Camera Brand: '. $camera['make'] .'</li>';
echo '<li>Camera Model: '. $camera['model'] .'</li>';
echo '<li>Lens: '. $camera['lens'] .'</li>';
echo '<li>Aperture: '. $camera['aperture'] .'</li>';
echo '<li>Shutter Speed: '. $camera['shutter'] .'</li>';
echo '<li>ISO: '. $camera['iso'] .'</li>';
echo '<li>Focal Length: '. $camera['focal'] .'</li>';
echo '<li>35mm Focal Length: '. $camera['35mmfocal'] .'</li>';
echo '<li>Metering Mode: '. $camera['meteringmode'] .'</li>';
echo '<li>Flash Mode: '. $camera['flash'] .'</li>';
echo '</ul>';
?>

0 comments on commit 6620936

Please sign in to comment.