Trying to extract the location data from a photo exif, but it's only showing 'Array' for the GPS data. It needs to save the data to a log file on a server for scraping. Am I doing something wrong? The photo definitely has geolocation data on it.
<?php
$image = "narnia.jpg";
$exif = exif_read_data($image, 0, true);
foreach ($exif as $key => $section) {
foreach ($section as $name => $val) {
echo "$key.$name: $val<pre>
</pre>";
}
}
?>
GPS.GPSLatitudeRef: N
GPS.GPSLatitude: Array
GPS.GPSLongitudeRef: W
GPS.GPSLongitude: Array
GPS.GPSTimeStamp: Array