2 require_once '../../../resources/portabilityLayer.php';
4 $tmpFile = sys_get_temp_dir() . "/" . "appcache_manifest_counter";
6 function getCount($file)
8 if (!file_exists($file)) {
9 file_put_contents($file, "0");
12 return file_get_contents($file);
15 function stepCounter($file)
17 if (file_exists($file)) {
18 $value = getCount($file);
19 file_put_contents($file, ++
$value);
23 if ("step" == $_GET['command'])
24 stepCounter($tmpFile);
26 header("Expires: Thu, 01 Dec 2003 16:00:00 GMT");
27 header("Cache-Control: no-cache, must-revalidate");
28 header("Pragma: no-cache");
29 header("Content-Type: text/cache-manifest");
31 print("CACHE MANIFEST\n");
32 print("# version " . getCount($tmpFile) . "\n");
33 print("with-versioned-manifest.php\n");