Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder1.news.weretis.net!feeder.erje.net!news.internetdienste.de!noris.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="ISO-8859-1" Message-ID: <1820235.7NaK4W3vae@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Fri, 24 Feb 2012 17:27:28 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 7Bit Subject: Re: chat on web, Ajax ? Newsgroups: comp.lang.php References: Followup-To: comp.lang.php MIME-Version: 1.0 Lines: 41 NNTP-Posting-Date: 24 Feb 2012 17:27:28 CET NNTP-Posting-Host: 1a440863.newsspool2.arcor-online.net X-Trace: DXC=^:k\BP33RW?]E=H1Q9`787A9EHlD;3Yc24Fo<]lROoR18kF I am implementing chat on the web, ie on a browse. On browser, I can only > use javascript. So the problem is what method to use to listen for > incoming data. The most compatible approach is to poll the server for new messages regularly. How to do that is on-topic in comp.lang.javascript. Useful answers on Usenet are more likely if you post under your real name. > Ajax ? I am just wondering; Ajax does not seem to bother about port, You are mistaken. BTW, "Ajax" is a misnomer; thinking "XMLHttpRequest" instead will get you further. > I mean the standard method is "open socket at server, port 8888...". No, it is not. > Of course, when data is sent to a php file on server, it must be port 80. No, it does not have to. > Is this the only way on a browser ? There is also the Comet approach, and there are Web Sockets. However, the latter has security issues and is not well supported as of yet. Your problem in general is on-topic in comp.infosystems.www.authoring.misc, not here. You should have known already as you noticed that this cannot be solved with PHP alone. Please adhere to the topic-oriented structuring of Network News, and Usenet in particular. And please do not start new threads for old problems. PointedEars -- realism: HTML 4.01 Strict evangelism: XHTML 1.0 Strict madness: XHTML 1.1 as application/xhtml+xml -- Bjoern Hoehrmann