I have written a php script, which connects to facebook chat via tcp socket. My questions are:
How to keep the socket alive even when the php script is ended? I want other php file to communicate with facebook XMPP server via this socket? I have tried to save the socket as a session variable, but it did not work.
I tried to use pfsockopen instead of socket_create, according to some forum discussion. But I always receive failure when I call pfsockopen function.
Any one has idea how to solve this?
Thanks!