FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » chat on web, Ajax ?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: chat on web, Ajax ? [message #177170 is a reply to message #177157] Fri, 24 February 2012 16:27 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FastCGI & PHP
Next Topic: PHP socket and NAT
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 01:56:58 GMT 2024

Total time taken to generate the page: 0.04411 seconds