= count($_SESSION['names'])) { $cur=0; } // error_log("no new file $cur"); } $_SESSION['key'] = $cur; // Date in the past header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // always modified header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // HTTP/1.1 header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); // HTTP/1.0 header("Pragma: no-cache"); Header("Content-Type: image/png"); $name=$names[$cur]; header("Content-Length: " . filesize($name)); $fp=fopen($name,"rb"); // dump the picture and stop the script fpassthru($fp);