PHP Code:
<?php
$stuff = <<<END
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Flush test </title>
</head>
<body>
HI. <br/>
END;
$stuff = $stuff . date('h:i:s') . "<br />";
$stuff = str_pad( $stuff , 3900 ) ;
echo $stuff ;
flush() ;
sleep( 5 ) ;
echo date('h:i:s') . "<br />\n";
echo <<<END
</body>
</html>
END;
?>
Seems like the output has to be a certain size before flush() will work on this setup.
Trial and error got padding the output to 3900 works.