NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP AND AOL Instant Messenger

Chris Bielanski Cbielanski at inta.org
Fri Oct 1 09:34:43 EDT 2004


This seems like a good reason to pick up on Flash, doesn't it?


Thanks,
Chris Bielanski
Web Programmer, 
International Trademark Association,
1133 Avenue of the Americas, 33rd Floor
New York, NY 10036
+1 (212) 642-1745, f: +1 (212) 768-7796
mailto:cbielanski at inta.org, www.inta.org  
INTA -- 125 Years of Excellence



> -----Original Message-----
> From: Dan Cech [mailto:dcech at phpwerx.net]
> Sent: Friday, October 01, 2004 9:28 AM
> To: NYPHP Talk
> Subject: Re: [nycphp-talk] PHP AND AOL Instant Messenger
> 
> 
> Joseph Crawford wrote:
> > I figured i would ask this here since there is not much for
> > documentation i have found on the web.
> > 
> > When you create a socket connection in PHP, will it carry 
> from page to
> > page or will you have to reconnect the socket everytime?
> 
> You would have to reopen the socket on each page.
> 
> > I was thinking of implementing an AOL IM from a web page that will
> > allow you to sign on and send IM's from the site, however i either
> > need to keep the main window open and figure out some way 
> not to close
> > the socket until they click logoff and open all IM windows as new
> > windows.  Or i need to be ablet o have the connection stay between
> > page calls.
> 
> There are a few different possibilities, depending on the system you 
> want to run it on.
> 
> In any case to do this through php you would most likely have 
> to have a 
> background server process running for each IM session (this 
> can just be 
> a php script), which would maintain the socket and do the actual 
> communication.
> 
> Your frontend would then pass any user inputs to the server 
> process and 
> read the output for display.
> 
> One way to set this up would be to use proc_open 
> (http://php.net/proc_open) to launch the server process with both its 
> input and output redirected to files.  Then when someone sends an IM 
> you send the command to the input file, the server process does the 
> communication and it writes the result to the output file.
> 
> Your script to display the conversation just grabs output from the 
> output file.
> 
> I haven't tried to build a system like this myself, but in theory I 
> think it should work.
> 
> Another possibility is to use a database to communicate between the 
> frontend and the server process, but it would probably be too 
> slow for 
> your purposes.
> 
> Dan
> 
> > If anyone has any links that could be helpfull i would 
> appreciate it,
> > all i have been able to find is this
> > 
> > 
http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_20450773.html
> 
_______________________________________________
New York PHP Talk
Supporting AMP Technology (Apache/MySQL/PHP)
http://lists.nyphp.org/mailman/listinfo/talk
http://www.newyorkphp.org



More information about the talk mailing list