blob: 1b772caf6e87a6322babd7040af5e64c75974e2a [file] [log] [blame]
<?php
function put_chunk($txt) {
echo sprintf("%x\r\n", strlen($txt));
echo "$txt\r\n";
}
header("Content-type: text/html; charset=UTF-8");
header("Transfer-encoding: chunked");
flush();
for ($i = 0; $i < 10000; $i++) {
put_chunk("$i<br>");
ob_flush();
flush();
usleep(1000000);
}
echo "0\r\n\r\n";
?>