Re: PHP Chat REALTIME
| From: | Fredrik Wahlberg | Date: | Wed, 23 Jan 2002 15:54:50 +0000 |
| Subject: | Re: PHP Chat REALTIME | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-81701@lists.php.net to get a copy of this message | ||
If you don't close the connection with the client you can use flush() to
send accumulated data.
Exampel:
Start the webpage
flush() // sends initial data
while (conversation in progress) {
if (newdata found) {
echo "newdata";
flush();
}
sleep(a while);
}
end page
--
----------------------------------------
Fredrik Wahlberg W: +46-8-54 54 56 12
Fusage AB C: +46-70-576 16 51
Kungstensgatan 38A F: +46-8-54 54 56 10
113 59 Stockholm fredrik@fusage.com
Sweden
"Nuno Mariz" <nmariz@websolut.net> wrote in message
news:1011695546.3467.5.camel@sputnik...
> I need to build a php-chat (online support system), but in realtime.
> I've develope a system that refresh in browser client in 5 seconds. But
> i need a system that works in realtime, what i meen is when a client or
> the server send a message, the browser refresh when a message was sent.
> All this without JAVA.
>
> thanx
>