V
Volte
Hey all. Been looking into this for a while now, got some mock ups and
whatnot. All works well (as far as the server "streaming" the data, via
a sleep and flush method right now just for functionality. Only Ajax
doesnt seem to appreciate it. Still caches the buffer and dumps it out
at once. I was wondering if you guys had any insights on this.
Here is the code.
header("Content-type:
multipart/x-mixed-replace;boundary=endofsection");
print ("\n--endofsection\n");
$pmt = array("-", "\\", "|", "/");
for ($i = 0; $i < 10; $i++)
{
sleep(1);
print ("Content-type: text/plain\n\n");
print ("Part $i\t".$pmt[$i % 4]);
print ("--endofsection\n");
ob_flush();
flush();
}
The AJAX code it s bit extensive, but i basically repeatedly check the
responseText over and over and it only shows up when its completed.
Thanks all, got to run.
whatnot. All works well (as far as the server "streaming" the data, via
a sleep and flush method right now just for functionality. Only Ajax
doesnt seem to appreciate it. Still caches the buffer and dumps it out
at once. I was wondering if you guys had any insights on this.
Here is the code.
header("Content-type:
multipart/x-mixed-replace;boundary=endofsection");
print ("\n--endofsection\n");
$pmt = array("-", "\\", "|", "/");
for ($i = 0; $i < 10; $i++)
{
sleep(1);
print ("Content-type: text/plain\n\n");
print ("Part $i\t".$pmt[$i % 4]);
print ("--endofsection\n");
ob_flush();
flush();
}
The AJAX code it s bit extensive, but i basically repeatedly check the
responseText over and over and it only shows up when its completed.
Thanks all, got to run.