summaryrefslogtreecommitdiff
path: root/getstatus.php.bak
diff options
context:
space:
mode:
authorAlib <aliboba@free.fr>2010-03-15 17:56:22 +0100
committerAlib <aliboba@free.fr>2010-03-15 17:56:22 +0100
commit438912c0c4a4075a5cd74cf9689451c9df4bbe34 (patch)
tree334e03bbba01b002a34d3cbf81ee7e600ec7bff6 /getstatus.php.bak
parenta8012963c23e7e5eaf487ee9e192ae5c4d4ccff2 (diff)
downloadistreamdev-438912c0c4a4075a5cd74cf9689451c9df4bbe34.tar.gz
istreamdev-438912c0c4a4075a5cd74cf9689451c9df4bbe34.tar.bz2
New Jquery branch. Initial development version for istreamdev 1.0
Diffstat (limited to 'getstatus.php.bak')
-rwxr-xr-xgetstatus.php.bak30
1 files changed, 30 insertions, 0 deletions
diff --git a/getstatus.php.bak b/getstatus.php.bak
new file mode 100755
index 0000000..368991b
--- /dev/null
+++ b/getstatus.php.bak
@@ -0,0 +1,30 @@
+<?php
+header('Content-type: application/json');
+$oldtree = null;
+$time = time();
+$i = 0;
+while((time() - $time) < 29)
+{
+ $tree = file_get_contents("status.txt");
+
+ if ($tree !== $oldtree )
+ {
+ $i+=1;
+ print $tree;
+ ob_flush();
+ flush();
+ }
+ $data = json_decode($tree);
+ if ($data->status == "ready")
+ {
+ break;
+ } else if ($data->status == "error")
+ {
+ break;
+ }
+ $oldtree = $tree;
+ usleep(1000);
+
+}
+
+?>