Chat script

apps

#1

For my chat script I need a code block like the one below to refresh the message window, locally it works but on Dreamhost it does not. What’s wrong, or Dreamhost does not sopport this? I always recieve a TCP COMUNICATION ERROR

<? echo "Cycle"; $id = 0; while ( $id < 5000 ) { $id++; print "$id"; flush(); sleep(2); } ?>

#2

I’m sorry, I’m not too sure. But could you do a meta refresh in the head tag of the window page?


#3

I think the problem is not dreamhost, but the nature of flush itself.
http://us2.php.net/manual/en/function.flush.php

Metatags are probably not optimal, as they interupt the entire page – for instance, a user typing will lose what they’re typing, in a chat script.

There is a solution on that page–whether or not it will work, though, I cannot confirm.