Imagine having a webpage that gradually returns a large amount of data over time. Here's an example code snippet to illustrate this:
<?php
$iTime = time();
while(time()-$iTime < 10 ) {
echo "Hello world";
echo str_repeat( ' ', 1024 ) . "<br />";
flush( );
sleep(3);
}
?>
The goal is to display all incoming data in real-time, updating the content as it arrives. Essentially, once a line of data is sent, it should be parsed and displayed immediately.
Can this be achieved using jQuery? Any guidance would be greatly appreciated.
Thank you for your assistance! :)