Page 1 of 1

Refresh a php chat window

Posted: Thu May 29, 2003 5:57 pm
by ampersand
Is there another way to refresh the chat window than using javascript or meta tags?

Posted: Thu May 29, 2003 6:19 pm
by m3mn0n
Sure.

Code: Select all

<?php
?>
<meta http-equiv="refresh" content="5; url=<?php echo $_SERVER["PHP_SELF"]; ?>"> 
<?
?>
Must be in the <header> tag and also you might want to change the refresh intervals.

Posted: Fri May 30, 2003 1:01 am
by Mr. Tech
That way works but the problem is if you have a heap of posts in your chat page, it has to load all over again and it could take a while or longer on a slower internet connection.

Anyone know of a better way?

Posted: Fri May 30, 2003 3:36 am
by Gleeb
WAP chat rooms generally just wait for user input for it to refresh. Lame, IMHO, but it works.

Posted: Sat May 31, 2003 10:01 am
by ampersand
I'm now using this in my "shoutbox/chatbox". Showing only 15 lines..