[nycphp-talk] Forcing page refresh
Chris Shiflett
shiflett at php.net
Thu Aug 7 12:04:42 EDT 2003
--- crisscott at netzero.com wrote:
> I am trying to figure out if there is a good way to make an
> instant messaging/chat program in php.
This is very different. You see, you don't need a new page; you just need a new
message added to the existing page.
This can be done using a chunked transfer encoding. So long as your Web server
(and your users' Web clients) does not buffer, the flush() function can be used
to output the next "chunk" to the user.
I wrote a (very poor) example of this a few years ago. This is the second time
I've mentioned it on a mailing list recently, so I'm feeling pressure to write
a simple chat-room example now. :-) Anyway, you can have a look and see if it
helps explain anything:
http://shiflett.org/tutorials/php_flush.php
Hope that helps.
Chris
=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
More information about the talk
mailing list