Hey experts, I got a nice one that I can't seem to find the answer to anywhere on the net.
I'm trying to set up a script that talks to a secure server. Once connected, the server will send a non stop data stream that I need to handle. The only way I can see this working where I would still have control in the script is to access the data stream with something like fsockopen, but I have to initiate the stream with a POST... I'm thinking this might be outside the limits of PHP, but I'd like to think not. cURL would be the best approach, but I can't figure out how to get the result from cURL stored into a buffer, and not have to wait for the full returned result (which would never happen due to the never ending datastream). Here is some pseudo code for clarification. Seems simple enough to me, but I don't think PHP has pointers, even though it's built in functions sometimes return them (i.e.: fopen).
Please educate me. I've gone through all of my PHP books (yeah I RTFM =D), and I've googled for a few days on this topic, but the solution eludes me.
Thanks in advance!
// Initialize the connection and store result into pointer or buffer
$pointer = OpenConnectionSomehow('https://www.example.com', $post_data);
// Do stuff with data