if (isset($_GET['t'])) {
$name = "./".$_GET['t'].".jpg";
$image = exif_thumbnail($name, $width, $height, $type);
if ($image) {
// send header and image data to the browser:
header('Content-type: ' .image_type_to_mime_type($type));
print $image;
die();
} else {
die();
}
}
?>
sponge's PDA Camera
sponge's PDA Camera
A whole new world in stalking! Check out my mobile phone pictures almost instantly after I take them! (A script running on my Windows Mobile phone launches the built-in camera app, waits until I take a picture and close the program, connects to the internet, and runs a python script to upload any new images it finds). The script also has the ability to pull in GPS coordinates, however I don't personally use them since the built-in GPS is rather weak.
date_default_timezone_set("EST");
$dir = scandir('.',1);
foreach ($dir as $file)
{
if (substr($file,-3,3) == "jpg") {
/* $info = exif_read_data($file, $imageinfo);
$finalstr = '';
if (is_array($imageinfo)) {
$iptc = iptcparse($imageinfo["APP13"]);
$lat = $iptc['2#200'][0];
if ($iptc['2#200'][0] != '') {
$lon = $iptc['2#201'][0];
$latstr = substr($lat,0,3)."°".substr($lat,3,2)."'".substr($lat,6,1).'.'.substr($lat,7);
$lonmin = (double) substr($lon,4);
$lonmin += 0.03;
$lonstr = substr($lon,0,4)."°".$lonmin."'";
$url = urlencode($latstr." ".$lonstr);
$finalstr = "
GPS: $latstr, $lonstr";
}
}*/
$exif = exif_read_data($file);
#print_r($exif);
$time = $exif['DateTimeOriginal'];
$thumb = "?t=".substr($file,0,-4);
#$thumb = "rescale.php?img=".substr($file,0,-4);
echo "

\n";
}
}
?>