summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAlib <aliboba@free.fr>2010-03-21 16:58:26 +0100
committerAlib <aliboba@free.fr>2010-03-21 16:58:26 +0100
commitdf0fc3656f11b78614d1709f2fb4f271bc98890a (patch)
tree16ba0ad47dca30f3a55c7629b8df1d6da395224d /bin
parent699e33d7edac42d61ab56d24650be8503697a0d8 (diff)
downloadistreamdev-df0fc3656f11b78614d1709f2fb4f271bc98890a.tar.gz
istreamdev-df0fc3656f11b78614d1709f2fb4f271bc98890a.tar.bz2
optimised cache handling. Now all images, js, css and html page are stored locally and cached for future session.
Added genmanifest.php to generate the istreamdev.manifest file firest time.
Diffstat (limited to 'bin')
-rw-r--r--bin/genmanifest.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/bin/genmanifest.php b/bin/genmanifest.php
new file mode 100644
index 0000000..26981c4
--- /dev/null
+++ b/bin/genmanifest.php
@@ -0,0 +1,37 @@
+<?php
+
+$filelisting = array();
+$dir_handle = @opendir('../logos');
+if (!$dir_handle)
+ return array();
+$staticcache = "";
+$inF = fopen("../staticcache.txt","r");
+while(!feof($inF)) {
+ $staticcache .= fgets($inF,255);
+ }
+fclose($inF);
+while ($logoname = readdir($dir_handle))
+ {
+ if($logoname == "." || $logoname == ".." || $logoname == 'lost+found')
+ continue;
+ $logoname_array[] = $logoname;
+ if ($logoname_array[0] == NULL)
+ return array();
+ $number = 1;
+ $logolist = "";
+ foreach($logoname_array as $value)
+ {
+ $logolist .= "logos/".$value."\n";
+ }
+ $inF = fopen("../istreamdev.manifest","w");
+ fwrite($inF,"CACHE MANIFEST\n");
+ fwrite($inF,"NETWORK:\n");
+ fwrite($inF,"bin/backend.php\n");
+ fwrite($inF,"ram/\n");
+ fwrite($inF,"playlist/\n");
+ fwrite($inF,"CACHE:\n");
+ fwrite($inF,$staticcache);
+ fwrite($inF,$logolist);
+ fclose($inF);
+}
+?>