hello,
how can i get the output file from the curl function to stream - to be processed like from fopen() or fsockopen()?
i'm trying soemthing like this but it doesn't work:
<?
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, "https://www.myurl.com");
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_READFUNCTION, 1);
$fp = curl_exec ($ch);
while (!feof($fp)) {
echo fgets ($fp,4096);
}
curl_close ($ch);
fclose ($fp);
?>
the error:
feof(): supplied argument is not a valid stream resource
apparently the file is return as a string. if i need to process it how will i do that? whitout saving it to disk first of course...
thanks...