I am trying to show another page loop using CURL but its not show data at real time after loop finish output will show. I need this real time. check this example code. and if there is another way to do this please tell me. I don't want to show my loop page URL so i use Curl to do that if any other way you know please tell.
Output Page
$ch = curl_init('http://localhost/test/loop.php');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
echo $hasil = curl_exec ($ch);
curl_close ($ch);
?>
Loop page
<?php
$a = 1;
while (true) {
echo $a;
$a++;
sleep(1);
}
?>