I got this from the manual (i think): <?php ob_end_flush(); while (10==10) { // cool while loop // get here som lines from a dbase or something flush(); sleep(1); } ?>
This just continues a while loop until the script times out. We currently use the refresh method but evaluating this as an alternative. We call the database every second to retrieve any new lines of chat in the room. You'll need to play around with a running id to ensure you only get the latest lines. Just a thought. Otherwise consider an applet. Check sourceforge, there are quite a number. Good luck. ----- Original Message ----- From: "Galen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Elfyn McBratney" <[EMAIL PROTECTED]> Sent: Tuesday, April 13, 2004 3:38 PM Subject: Re: [PHP] PHP Web-Chat Software Elfyn, I've seen stuff like that. The problem comes in with the refreshing: 1) many browsers flicker when a refresh happens 2) refreshes must occur very frequently to make chat window feel "responsive" 3) frequent refreshes make window "flicker" annoyingly often on some browsers I'm poking around looking for something with a little more advanced approach if possible. Anyone else got suggestions? -Galen On Apr 13, 2004, at 1:28 AM, Elfyn McBratney wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello Galen, > > On Tuesday 13 Apr 2004 07:12, Galen wrote: >> Hi PHP people, >> >> I'm looking for PHP-based chat software. This is more of casual thing, >> otherwise I'd go out and write my own that works exactly the way I >> want, but I just don't have the time. >> >> I've tried several packages, and every single one has very significant >> browser problems. The problems go on and on and on... which chat >> programs (don't forget to mention the version you're using) have >> "robust" web-based chatting interfaces? I'd rather not try all of the >> hundreds of packages out there on several different browsers to find >> out! >> >> Also, this has gotta be PHP/MySQL only - no daemons please! The >> requirements are simple, so I don't need loads of complex stuff, >> simpler (interface-wise) is better here, but I most need something >> that >> plain works! > > I don't know of any 'mainstream' chat apps, but I have one I wrote for > a > client (gpl licensed) that's ~800 lines and uses SQLite as a > data-source > (would be simple to change to MySQL). If you want it, let me know and > I'll > put it up somewhere. > > But this is simple: the client refreshes every variable number of > seconds (say > 1), uses basic html (font, bold, italics, etc) and a bit of browser > detection > magic for frames and font depths. Something you could probably write > in an > hour ;) > > Elfyn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php