groomi Posted December 2, 2007 Share Posted December 2, 2007 Hello, I am trying to make a simple MSN client in PHP to use in places when I don't have access to MSN it's self. My initial thought was to use socks to connect and then send/retreive commands over the socket to communicate with the MSN server.. The problem arises when the page is refreshed or a link is pressed as the socket is destroyed. I have tried many different things to retreive a socket and continue using it after the page is reloaded. My question is: Is there a way that I can use the same socket after a page has been refreshed. I first thought of using pfsockopen() and assigning the socket to a session variable but this failed. Any help would be much appreciated Thanks Quote Link to comment Share on other sites More sharing options...
groomi Posted December 3, 2007 Author Share Posted December 3, 2007 bump Quote Link to comment Share on other sites More sharing options...
5ubliminal Posted December 3, 2007 Share Posted December 3, 2007 Make sure you don't use PHP as CGI. You need it as a module. Persistant stuff is not that easy to handle. Use with caution! Quote Link to comment Share on other sites More sharing options...
groomi Posted December 6, 2007 Author Share Posted December 6, 2007 bump Quote Link to comment Share on other sites More sharing options...
groomi Posted December 6, 2007 Author Share Posted December 6, 2007 well.. it would seem from looking that this is impossible I guess it's time to learn a new web language.. screw php Quote Link to comment Share on other sites More sharing options...
btherl Posted December 7, 2007 Share Posted December 7, 2007 pfsockopen() does not operate with sessions. Resources cannot be place in sessions in any case. It's not clear from the manual what the correct usage is, but from the comments it appears to be that you make the same call that you made the first time, and you will receive the persistent socket. Quote Link to comment Share on other sites More sharing options...
groomi Posted December 7, 2007 Author Share Posted December 7, 2007 I'll give that a go.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.