Hi
Im trying to make a script that sends and receives data on a TCP connection to present a web interface to a server. The connection to the server needs to be held for as long as the user is 'logged in' on the web site so the connection needs to be kept open and used again by several 'runnings' of the PHP script.
My plan was to use 'pfsockopen' to open the connection and keep the socket handle in a cookie using 'serialize' so that every time the script is run it can pick up the connection again.
First up, is this the right way to do it?
Second (assuming this is the way to do it), why does pfsockopen not seem to work where fsockopen does? When i open a connection with fsockopen and read with fgets, data is returned. Using pfsockopen in the exact same script returns no data when fgets is used. Why is this?
Thanks muchly in advance
Cheers
Tom