Getting the cURL stream in PHP -
-
If I run
curl_exec
with no option, then fetch The page that has been output gets output to the standard output of php (back HTML page is served). -
If I run it from the
RETURNTRANSFER
option, then I can get the whole page in a variable.
How can I get a stream that I can parse manually?
In 1 case, I can not access data, parse it and in case of 2, I have to wait until it is completely downloaded before starting to purse it. I would like to do something similar to fopen ()
and fread ()
as fread ($ curl_handle, 1000)
as soon as you read 1000 bytes , And after reading 2000 bytes, the second call will return, etc.
You may be interested in this: I explained and used to use striped rappers with curls Given an example, it is being received to be capable of receiving data - which you think is what you want to do.
Probably not the exact answer to your question, but it may be that you are required to implement any solution ;-)
Comments
Post a Comment