I had a problem that I think might be similar to what you are struggling with and solved it by causing the browser to drive the "push" (or in this case more like a "pull"). The main page was sent with an imbedded frame and other controls to allow the user to type in his real-time responses and a submit button to send them. If I recall the details correctly, what appeared in the imbedded frame was a separate page that contained JavaScript that that caused the imbedded page to be automatically refreshed every few seconds (this would display your chat activity query results, refreshing every few seconds), while the textarea on the base page remained static for a user to type in and submit their own text. It worked in the version of IE I was supporting, but is at best risky that odd browsers (or other browsers) won't support IFRAMEs in exactly the same way.
This worked for me, hope it gives you an option, other than resorting to an applet, yeuk. ;-) Warren Vail -----Original Message----- From: John Nichel [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 19, 2004 2:00 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Text/Image Streaming in PHP for a web chat application Stephen Lake wrote: > Hey all, > > After reviewing all the scripts written for a web chat application at > the various sites (ie Hotscripts, cgi resource and so on) I have > resorted to writing my own as none available fit my specific > requirements. > > What I need to know is, how can I implement a server push alternative > and/or text stream to a browser? or for that matter if anyone has code > available or knows of code that is even remotely similar to IFCS > (Interfun Chat Server > http://www.interfun.com) they would be willing to share with me would be > greatly appreciated. > I've played around with this a couple of times. Once using sockets, and another time just setting the max_execution_time of the script in the bottom frame to some ungodly size, running a loop which checks for new messages after sleeping for 10 seconds or so. It turned out to be more of a pain than it was going to be worth. If you come across something that has the look and feel of Chatropolis, but doesn't cost $1500, I'm interested. BTW, it's http://www.interfun.net -- John C. Nichel KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php