how to show results while a php script is still running
<p>so I have tried <a href="http://stackoverflow.com/questions/5415665/show-results-while-script-is-still-executing">Show results while script is still executing</a></p>

<p>but for some reason it doesnt work, so here is what I have so far : </p>

<pre><code>ob_start();
include "../../common.php";

set_time_limit (0);

$start = (string) $_GET['start'];
$end = (string) $_GET['end'];

for($i = $start; strcmp($i, $end); $i = bcadd($i, 1)){

echo $i;
ob_flush();

}

ob_end_flush(); 
</code></pre>

<p><strong>UPDATED CODE</strong></p>

<p>*note that this code doesnt work yet! </p>

<pre><code>set_time_limit(0);

$start = $_GET['start'];
$end = $_GET['end'];

for(;$start &lt; $end;$start++){
$content = file_get_contents("[some internal page]");
echo $content;
usleep(10); 
flush();
}
</code></pre>
