Hi
In one of my scripts, I'm using the following code to put text on a browser with server push :
print ("\n--$end\n"); //start data block
print ("Content-type: text/html\n\n");
print ("<H1>This is output!</H1>"); // I'm using fgets and fputs here
print ("\n--$end\n");
flush ();
sleep (1);
When I execute this piece of code in a loop, the page doesn't refresh at al, but finally (after about "loop"*1 second) it refreshes "loop" times very quickly. When leaving the sleep function out, it refreshes during execution, but also too fast. Do I have to use another function (instead of flush()) to force the output to be sent to the browser before the sleep() function is executed?
Thank you