camera.php 476 Bytes
Newer Older
mpomery's avatar
mpomery committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
	$camera = ($_GET['camera']?$_GET['camera']:'nocamera');
	$imagelocation="../";
	$file = $imagelocation.strtolower($camera).".jpg";
	header("Expires: ".gmdate("D, d M Y H:i:s", time())." GMT");
	if (!is_readable($file)) {
		$file="nocamera.jpg";
	}
	header("Content-Type: image/jpeg");
	header("Content-Length: ".filesize($file));
	header("Last-Modified: ".gmdate("D, d M Y H:i:s", filectime($file))." GMT");
	$fp = fopen($file, 'rb');
	fpassthru($fp);
	fclose($fp);
?>