Re: PEAR Net_Socket connection across pages

From: Date: Tue, 03 Aug 2004 14:50:23 +0000
Subject: Re: PEAR Net_Socket connection across pages
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13947@lists.php.net to get a copy of this message
Chris Burns wrote:
Hello, I am trying to write a script that connects to a server and keeps a socket object in a session. The socket should remain open on all pages visited until the user hits 'Close Connection'. However, using the Net_Socket class it appears that as soon as the user logs in, and then is redirected to another page, the socket closes as soon as the login page is closed. How can i preserve the socket connection across multiple pages so users do not have to log in every time they visit a new page. Thanks, Chris If you really need to keep the socket open the only solution you have is a neat hack like, create a small php daemon to handle the socket connection and then talk to the actually web server using shared memory or something like that.
You could also look at using srm (http://www.vl-srm.net/) to make the connection and handle the persistence but its not stable or being activly developed right now.

« previous php.pear.general (#13947) next »