I have a simple page that when the submit button is clicked I load a page using load()
eg:
$("#res").load("do.php");
do.php contains a few simple command that are run and return the results to screen.
If I run do.php directly in my browser I get the results displayed on screen in real time as they script runs then and gets the results back.
However when called from another page using load()
I only get the results page once do.php has completely finished.
Is there any way to call do.php from another page and have its results returned live ?
do.php contains simple commands similar to:
<?php
$cmd = 'ping 127.0.0.1';
while (@ ob_end_flush());
$proc = popen($cmd, 'r');
echo '<pre>';
while (!feof($proc))
{
echo fread($proc, 4096);
@ flush();
}
echo '</pre>';
?>