How to implement COMET with PHP

Comet is a programming technique that enables web servers to send data to the client without having any need for the client to request it. This technique will produce more responsive applications than classic AJAX. In classic AJAX applications, web browser (client) cannot be notified in real time that the server data model has changed. The user must create a request (for example by clicking on a link) or a periodic AJAX request must happen in order to get new data fro the server.

I will now explain how to implement Comet with PHP programming language. I will demonstrate it on two demos which uses two techniques: the first one is based on hidden ”<iframe>” and the second one is based on classic AJAX non-returning request. The first demo will simply show the server date in real time on the clients and the second demo will display a mini-chat.

本日志由 flyinweb 于 2009-06-30 10:50:06 发表到 WEB应用开发 中,目前已经被浏览 4257 次,评论 0 次;

作者添加了以下标签: PHPCOMET

首页只显示了部分日志内容,要查看日志的全部内容请阅读全文