first full working version of iframe forever streaming
[brisk.git] / web / index_rd_ifra.php
index 58de337..86a1b2e 100644 (file)
@@ -451,7 +451,7 @@ header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
 header('Content-type: text/html; charset="utf-8"',true);
 
-$ssss = 
+$four_rnd_string = 
  "GGZDGDRBXDWFXHGPYAAVDXEKFDUWSTEDTDVXBXQPMZAIFPNLRPTWMJAZRHXTIRNZ"
 ."HTZXAUVJDCLXENDCLIZXSSEQQGUADYEKNNANJWEGRUFHPLUNSEROZQJSLMUYNUVG"
 ."FPLQAGCMTTGIRRXZFBFQFTRBYPHTWFSXFKHKYBRDAOSOURCMEVGPVXJVUQAOCFPV"
@@ -534,7 +534,7 @@ window.onload = function () { if (http_streaming != "ready") { http_streaming.re
 <?php
 
 echo("<!-- ");
-echo($ssss);
+echo($four_rnd_string);
 echo(" -->\n");
 mop_flush();
 
@@ -551,7 +551,7 @@ $old_subst = $subst;
 $old_step =  $ext_step = $step;
 
 $no_data = TRUE;
-for ($i = 0 ; time() < $endtime ; $i++) {
+for ($i = 0, $script_step = 0 ; time() < $endtime ; $i++) {
   // log_rd("PRE MAIN ".$step);;
   $pre_main = gettimeofday(TRUE);
   if (($ret = maincheck($sess, $old_stat, $old_subst, $old_step, &$stat, &$subst, &$step)) != FALSE) {
@@ -565,7 +565,7 @@ for ($i = 0 ; time() < $endtime ; $i++) {
       printf("<script id='hs%d' type='text/javascript'><!--
 push(\"%s\");
 // -->
-</script>", $i, escpush($ret) );
+</script>", $script_step++, escpush($ret) );
 
     log_send("IS_PAGE: ".($is_page_streaming == TRUE ? "TRUE" : "FALSE")." EXT_STEP: ".$ext_step." ENDTIME: [".$endtime."] ".$ret);
     mop_flush();
@@ -584,7 +584,7 @@ push(\"%s\");
           printf("<script id='hs%d' type='text/javascript'><!--
 push(null);
 // -->
-</script>");
+</script>", $script_step++);
           mop_flush();
           log_crit("flush");
       }