How should I implement a very simple one-to-one chat on a PHP page? Comet?

How should I implement a very simple one-to-one chat on a PHP page? I thought I should use Ajax and jQuery, but this generates too many connections to the server.

I know that Facebook is using Comet, but after searching I only found one article from 2009. Now it’s 2011, and there are still very few articles about Comet.

Why? What is better? Is there a good article about creating a very simple one-to-one chat application?

Answers


Use websockets, for example via phpwebsocket. If you use socket.io on the frontend, it will work in almost any browser.


Need Your Help

Modifiying Spring Url in an aspect like way

java spring spring-mvc url-rewriting

I am looking for a way how to modify the urls within the spring:url- tag implementation, without modifying the jsps.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.