-
Notifications
You must be signed in to change notification settings - Fork 1
/
cache.php
44 lines (32 loc) · 954 Bytes
/
cache.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
header("Content-type: text/cache-manifest;");
echo "CACHE MANIFEST\n\n";
$hashes = md5_file("instalador.html");
$cache = array();
$network = array();
$fallback = array();
$cache[] = "app.html";
$cache[] = "bibliotecas/bootstrap/css/bootstrap.css";
$cache[] = "bibliotecas/js/jquery.js";
$cache[] = "bibliotecas/bootstrap/js/bootstrap.js";
//$network[] = "";
// $fallback[] = array("destaquesDoMes.php","destaquesOffline.html");
// $fallback[] = array("webcam/aovivo.jpg","webcam/offline.gif");
echo "\nCACHE:\n";
foreach($cache as $entrada){
echo $entrada."\n";
$hashes .= md5_file($entrada);
}
echo "\nNETWORK:\n";
foreach($network as $entrada){
echo $entrada."\n";
$hashes .= md5_file($entrada);
}
echo "\nFALLBACK:\n";
foreach($fallback as $entrada){
echo implode(" ", $entrada)."\n";
$hashes .= md5_file($entrada[0]);
$hashes .= md5_file($entrada[1]);
}
echo "\n#HASH:"; echo md5($hashes);
?>