If I run curl_exec without parameters, the selected page will be output to standard php output (the html page will be returned).
If I run it using the RETURNTRANSFER parameter, I can get the whole page in a variable.
How can I get a stream that I can manually parse?
In case 1, I canβt access the data for analysis, and in case 2 I need to wait until it is fully loaded before starting to analyze it. I would like something similar to fopen() and fread() , where fread($curl_handle, 1000) will return as soon as the first 1000 bytes are read, and the second call will be returned after reading 2000 bytes, etc.
source share