Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Arno Welzel Newsgroups: comp.lang.php Subject: Re: chat on web, Ajax ? Date: Sun, 26 Feb 2012 04:54:52 +0100 Organization: A noiseless patient Spider Lines: 30 Message-ID: <4F49AD0C.80007@arnowelzel.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Injection-Info: mx04.eternal-september.org; posting-host="ly65diorMZCkE+3l1nGWog"; logging-data="6589"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19p5iSfqwdlzDvvRr91Hwz1+oJLENrkBqU=" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 In-Reply-To: Cancel-Lock: sha1:dwViR9CnClXRMaD8AbeHzpegEu8= Xref: x330-a1.tempe.blueboxinc.net comp.lang.php:5009 sl@exabyte, 2012-02-24 14:59: > Hi folks. > > I thought I have gathered all pieces I need, then suddenly I realise there > is still one problem. > > 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. There is no method. You have to poll every x seconds to check, if there is new information available. Netscape and Mozilla implemented an alternative way, but this is neither standard nor recommended to be used. > Ajax ? I am just wondering; Ajax does not seem to bother about port, I mean > the standard method is "open socket at server, port 8888...". Did you try ? > Of course, when data is sent to a php file on server, it must be port 80. Only, if the server is configured to respond on port 80. A web server can also use other ports. -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de