<?php
require_once "json/JSON.php";
require_once "getphotoexif.php";

$filename = $_REQUEST['photo'];
$callback = $_REQUEST['callback'];

$exif = getExifData($filename);  

$json = new Services_JSON();
$output = $json->encode($exif);

if ($callback) {
   $output = $callback . "(" . $output . ")";
}

echo $output;

?>
