Here is my code
$url = "partial_response.php"; $sac_curl = curl_init(); curl_setopt($sac_curl, CURLOPT_HTTPGET, true); curl_setopt($sac_curl, CURLOPT_URL, $url); curl_setopt($sac_curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($sac_curl, CURLOPT_HEADER, false); curl_setopt($sac_curl, CURLOPT_TIMEOUT, 11); $resp = curl_exec($sac_curl); curl_close($sac_curl); echo $resp;
Partial_response.php
header( 'Content-type: text/html; charset=utf-8' ); echo 'Job waiting ...<br />'; for( $i = 0 ; $i &
From code trying to get a partial response from partial_response.php. what I want, I need to twist to return to me "Job waiting ..", and not wait until part_response.php completes the loop and returns all the data. so when I decrease CURLOPT_TIMEOUT below 11, I don't get any response at all. Please clarify my doubts. Thanks in advance.
source share