ctx_new moved inside iframe to avoid inconsistencies, stream with commands added
[xynt.git] / web / winstream_rd.php
1 <html>
2 <head>
3 <script type="text/javascript" src="xynt/xynt-console.js"></script>
4 <!-- <script type="text/javascript">
5 window.onload_old = function() {
6     // parent.ifra.contentWindow.location.href = 'winstream_rd.php';     
7      window.location.href = 'winstream_rd.php';     
8 }
9
10 </script> -->
11 <?php
12 function mop_flush()
13 {
14     ob_flush();
15     flush();
16 }
17
18 function main()
19 {
20     $s = "";
21     for ($i = 0 ; $i < 4096 ; $i++) {
22         $s .= rand(0,255);
23     }
24     for ($i = 0 ; $i < 300 ; $i++) {
25         
26         /*                    parent.document.getElementById('cont').innerHTML = \"%d\";
27                              parent.allmythings =  \"%d\"; */
28         if ($i != 350) {
29             printf("<script id=\"hs%d\" type=\"text/javascript\">
30                     parent.allmythings = %d;
31                     console.log(\"zorro \"+parent.allmythings);
32
33                 </script>", $i, $i);
34         }
35         else {
36             printf("<script id=\"hs%d\" type=\"text/javascript\">
37                     parent.allmythings = %d;
38                     console.log(\"zorro \"+parent.allmythings);
39                     parent.document.location.assign('winstream2.php');
40                 </script>", $i, $i);
41         }
42         if ($i == 0)
43             printf("<!-- %s -->", $s);
44         mop_flush();
45         usleep(1000000);
46     }
47 }
48 main();
49 ?>
50 </head>
51 <body>
52 </body>
53 </html>