SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast mynics's Avatar
    Join Date
    Jan 2002
    Location
    Saigon, Vietnam & Toronto, Canada
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is this possible in PHP and if not... how the heck do I do it?!?

    Hi,

    I'm currently nearing completion of a chat script, but for the life of me, I don't know how to get the taskbar to blink when someone says something in the room. Is there an easy way to do this?

    *pulls out all remaining hairs and puts on a new thinking cap*
    Asianca.com - Please join our online Asian community
    TorontoGunViolence.com - Speak up against the violence!

  2. #2
    SitePoint Zealot
    Join Date
    Aug 2002
    Posts
    180
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anything is possible.

    there is no way to manually make php do that, but depending on how you have written the chat room, the browser may do it for you.

  3. #3
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    With some creative thinking, Javascript would do the trick just nicely.

  4. #4
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The thing with chat apps is you have to get the browser to update in real time - that means you either have it refresh every X seconds (usually not pretty) or you need some kind of app the client loads - Flash is a good choice if you have the tools - check out http://www.sitepointforums.com/showt...threadid=98685 for starters

    Otherwise may be a Java applet or even XUL.

  5. #5
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    PHP can do chat. It's not real good on server resources. You could do something like this.
    PHP Code:
    <?php
    ob_implicit_flush
    ();
     
    while(
    1)
    {
       
    // do chat stuff here
    }
    ?>

  6. #6
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you choose to refresh the page, then don't refresh the page; refresh a hidden IFRAME instead; i.e. 1*1 pixels and pass the data from the IFRAME to the parent window using Javascript.

    Thus you get the refresh but the user doesn't see it - it isn't obvious unless s/he looks at the progress bar 8)

    The Document Object Model is perfect for this BTW.

  7. #7
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Another thought - I don't like the idea of using Flash for something this easy and simple.

    In fact; I don't like Flash at all. LoL

  8. #8
    SitePoint Zealot
    Join Date
    Aug 2002
    Posts
    180
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DJ P@CkMaN
    PHP can do chat. It's not real good on server resources. You could do something like this.
    PHP Code:
    <?php
    ob_implicit_flush
    ();
     
    while(
    1)
    {
       
    // do chat stuff here
    }
    ?>
    this is how i would have done it...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •