first http-streaming with iframe working on ff and ie
[xynt.git] / web / test-hs-rd.php
diff --git a/web/test-hs-rd.php b/web/test-hs-rd.php
new file mode 100644 (file)
index 0000000..67bc876
--- /dev/null
@@ -0,0 +1,53 @@
+<html>
+<head>
+<script type="text/javascript" src="xynt/xynt-console.js"></script>
+<!-- <script type="text/javascript">
+window.onload_old = function() {
+    // parent.ifra.contentWindow.location.href = 'winstream_rd.php';     
+     window.location.href = 'winstream_rd.php';     
+}
+
+</script> -->
+<?php
+function mop_flush()
+{
+    ob_flush();
+    flush();
+}
+
+function main()
+{
+    $s = "";
+    for ($i = 0 ; $i < 4096 ; $i++) {
+        $s .= rand(0,255);
+    }
+    for ($i = 0 ; $i < 300 ; $i++) {
+        
+        /*                    parent.document.getElementById('cont').innerHTML = \"%d\";
+                             parent.allmythings =  \"%d\"; */
+        if ($i != 350) {
+            printf("<script id=\"hs%d\" type=\"text/javascript\">
+                    parent.allmythings = %d;
+                    console.log(\"zorro \"+parent.allmythings);
+
+                </script>", $i, $i);
+        }
+        else {
+            printf("<script id=\"hs%d\" type=\"text/javascript\">
+                    parent.allmythings = %d;
+                    console.log(\"zorro \"+parent.allmythings);
+                    parent.document.location.assign('winstream2.php');
+                </script>", $i, $i);
+        }
+        if ($i == 0)
+            printf("<!-- %s -->", $s);
+        mop_flush();
+        usleep(1000000);
+    }
+}
+main();
+?>
+</head>
+<body>
+</body>
+</html>
\ No newline at end of file