ctx_old attribute removed (we will use ctx_old_len only), url_complete js function...
[xynt.git] / web / test-hs.php
index 3ffd263..8711ef9 100644 (file)
@@ -4,24 +4,31 @@
 <script type="text/javascript" src="xynt/xynt-console.js"></script>
 <script type="text/javascript" src="xynt/xynt-http-streaming.js"></script>
 <script type="text/javascript"><!--
-var allmythings="BEGIN";
+var gst = null;
 
 <?php
     if ($action != 'stop') {
 ?>
 window.onload = function () {
     var hs;
-    hs = new http_streaming(window, console);
-    // FIXME: with relative path not work!
-    hs.start('http://dodo.birds.lan/xynt/test-hs-rd.php');
-    // hs.start('test-hs-rd.php');
+    var sess;
+
+    sess = '<?php
+    if (!isset($sess)) {
+        $sess = md5(mt_rand());
+    }
+    printf("%s", $sess);
+?>';
+    
+    createCookie('sess', sess, 24*365,cookiepath);
+    gst = new globst();
+    hs = new http_streaming(window, gst, sess, console);
+    hs.start('test-hs-rd.php');
 };
 <?php
     }
 ?>
 
-
-
 window.onkeypress = function () {
     console.log("win kpress");
 }