My application's backend in PHP sends HTTP requests to other servers and receives large responses from them.
At the moment I'm using curl_setopt($curlResource, CURLOPT_FILE, $fileResource);
to avoid storing the response in memory so I don't have to increase memory limits for the script.
What I want to achieve is for my script to receive the HTTP response from other server and to process it in real-time, discarding pieces of data already processed.
Is it even possible without something fancy like a socket connection to ports 80 or 443 to receive data without the help of CURL?