// turn off all layers of output buffering, if any
while (ob_get_level()) {
ob_end_flush();
}
// some browsers tend to buffer the first N bytes of output, refusing to render until then
// give them what they want...
echo str_repeat(' ', 1024);
echo date('h:i:s') . "<br>";
// force php to flush its output buffers. this also TRIES to tell the webserver to flush, but may not work.
flush();
sleep(5);
echo date('h:i:s');
flush();
you may improve robustness by echoing more spaces before each call to flush(). I say this because there's possibly many layers of software between the server and users browser, and any of those layers might decide to buffer until it gets enough data to send what it feels is a reasonably sized network frame. padding with spaces might help subvert the buffering.