I've been kidding around with a chat experiment of my own a few weeks ago and
stumbled in the same problem with refresh, so I'm quite interested in this
discussion. So, ok, I didn't know about flush() at all, but how do you keep the
http connection open in the first place? Just keep looping in the PHP or is
there a smarter way?

Bogdan

Joffrey van Wageningen wrote:

> > I dont think its possible without Java programing.
>
> its posible to keep a http connection open and trust on flush() to send some
> data to the client, if this data contains javascript you could update a
> window or something... if you want to make this safe: make sure you use a
> combination of a open http connection with flush() and reload the frame your
> flush()'ing time to time (in case of a proxy server)
>
> shoplist for a chat:
> * 3 frames: 1 to display incomming data, 1 to have a input field and post to
> the server and 1 to receive data from your http stream (could be hidden)
>
> * some javascript to move the data from the http stream window to the
> display window
>
> * a db backend and maybe a check (with the post, or the refresh) which lines
> have been received by the client
>
> * a cute design :)
>
> with kind regards,
> Joffrey van Wageningen
> ne2000.nl




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to