Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #4988

Re: chat on web, Ajax ?

Message-ID <1820235.7NaK4W3vae@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Organization PointedEars Software (PES)
Date 2012-02-24 17:27 +0100
Subject Re: chat on web, Ajax ?
Newsgroups comp.lang.php
References <ji853f$ooi$1@news.albasani.net>
Followup-To comp.lang.php

Followups directed to: comp.lang.php

Show all headers | View raw


sl@exabyte wrote:

> 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

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

chat on web, Ajax ? "sl@exabyte" <sb5309@hotmail.com> - 2012-02-24 21:59 +0800
  Re: chat on web, Ajax ? "sl@exabyte" <sb5309@hotmail.com> - 2012-02-24 22:15 +0800
    Re: chat on web, Ajax ? Captain Paralytic <paul_lautman@yahoo.com> - 2012-02-24 06:20 -0800
      Re: chat on web, Ajax ? "SL" <sb5309@hotmail.com> - 2012-02-24 23:52 +0800
        Re: chat on web, Ajax ? The Natural Philosopher <tnp@invalid.invalid> - 2012-02-24 15:59 +0000
          Re: chat on web, Ajax ? "SL" <sb5309@hotmail.com> - 2012-02-25 00:23 +0800
            Re: chat on web, Ajax ? Doug Miller <doug_at_milmac_dot_com@example.com> - 2012-02-24 16:52 +0000
              Re: chat on web, Ajax ? "sl@exabyte" <sb5309@hotmail.com> - 2012-02-25 10:01 +0800
    Re: chat on web, Ajax ? "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-02-24 16:22 +0100
  Re: chat on web, Ajax ? Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-02-24 15:28 +0100
    Re: chat on web, Ajax ? Tim Streater <timstreater@greenbee.net> - 2012-02-24 14:51 +0000
      Re: chat on web, Ajax ? The Natural Philosopher <tnp@invalid.invalid> - 2012-02-24 15:54 +0000
        Re: chat on web, Ajax ? Tim Streater <timstreater@greenbee.net> - 2012-02-24 19:02 +0000
          Re: chat on web, Ajax ? The Natural Philosopher <tnp@invalid.invalid> - 2012-02-24 21:06 +0000
            Re: chat on web, Ajax ? Tim Streater <timstreater@greenbee.net> - 2012-02-24 21:38 +0000
              Re: chat on web, Ajax ? The Natural Philosopher <tnp@invalid.invalid> - 2012-02-24 21:51 +0000
                Re: chat on web, Ajax ? Tim Streater <timstreater@greenbee.net> - 2012-02-24 22:26 +0000
                Re: chat on web, Ajax ? The Natural Philosopher <tnp@invalid.invalid> - 2012-02-25 13:15 +0000
                Re: chat on web, Ajax ? Tim Streater <timstreater@greenbee.net> - 2012-02-25 13:20 +0000
                Re: chat on web, Ajax ? The Natural Philosopher <tnp@invalid.invalid> - 2012-02-25 13:33 +0000
                Re: chat on web, Ajax ? Tim Streater <timstreater@greenbee.net> - 2012-02-25 13:42 +0000
    Re: chat on web, Ajax ? "SL" <sb5309@hotmail.com> - 2012-02-25 00:31 +0800
  Re: chat on web, Ajax ? The Natural Philosopher <tnp@invalid.invalid> - 2012-02-24 15:48 +0000
  Re: chat on web, Ajax ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-02-24 17:27 +0100
  Re: chat on web, Ajax ? Jeff North <jnorthau@yahoo.com.au> - 2012-02-26 00:13 +1100
  Re: chat on web, Ajax ? Arno Welzel <usenet@arnowelzel.de> - 2012-02-26 04:54 +0100

csiph-web