<?php

### we must have been past arguments with GET:
if ($_SERVER[REQUEST_METHOD] != 'GET') { 
  exit ();
}

$filename = $_GET[file];

$file = fopen ($filename, "r");
if ($file && !$debug) {
  header ('Content-Type: image/png');
  fpassthru ($file);
}

unlink($filename);
exit ();
?>
