View Single Post
Old 02-28-2010, 01:17 AM  
borked
Totally Borked
 
borked's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 6,284
Code:
<?php

ob_implicit_flush(true);
ob_end_flush();

flush();

$i = 0;
while($i++ < 100)
{
        echo '.';
        sleep(10);
        flush();
        if ($i%10==0) echo "\n<br />";
}

?>
I put the sleep to 10 secs cos I wasn't waiting 40+ mins to see any output ;)

if your server doesn't do the same, compare the headers of:
http://borkedcoder.com/flush.php

with your server. Mine are:
Date: Sun, 28 Feb 2010 08:09:51 GMT
Server: Apache
Vary: Accept-Encoding
Content-Encoding: gzip
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

200 OK
__________________

For coding work - hit me up on andy // borkedcoder // com
(consider figuring out the email as test #1)



All models are wrong, but some are useful. George E.P. Box. p202
borked is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote