php check function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel

    php check function

    Hello all,

    I want to have a PHP script to open a popup on the right bottom of the
    screen(like hotmail or yahoo).
    I want to write a function that checkes every 10 seconds, if there are new
    messenges from an Mysql database ,
    if CurrCount < NewCount , the check will be made.
    Can anyone point me in the right direction?


    Thanks in advance

    Danny


  • Lateralus

    #2
    Re: php check function

    What you're looking for will require AJAX, assuming you don't want to
    refresh a page every 10 seconds to formulate a new request. You cannot
    do this in php alone, as php is server side.

    Comment

    • Tim Van Wassenhove

      #3
      Re: php check function

      On 2005-08-25, Lateralus <phpdeity@gmail .com> wrote:[color=blue]
      > What you're looking for will require AJAX, assuming you don't want to
      > refresh a page every 10 seconds to formulate a new request. You cannot
      > do this in php alone, as php is server side.[/color]

      How can you do this with AJAX without perform a (XMLHTTP) request every
      10 seconds? Btw, have you tried conditional get with XMLHTTP already? In
      my experience it doesn't work well...

      --
      Met vriendelijke groeten,
      Tim Van Wassenhove <http://timvw.madoka.be >

      Comment

      • Alvaro G Vicario

        #4
        Re: php check function

        *** Tim Van Wassenhove wrote/escribió (Thu, 25 Aug 2005 23:30:01 +0000
        (UTC)):[color=blue]
        > How can you do this with AJAX without perform a (XMLHTTP) request every
        > 10 seconds?[/color]

        Performing an XMLHTTP request and reloading the page are different things.
        In the first case user doesn't need to know that the page is being
        reloaded: he can read contents and fill forms normally.

        But of course that's JavaScript and it's offtopic ;-P

        http://en.wikipedia.org/wiki/Ajax_%28programming%29 (the links section has
        interesting info)


        Another typical option is using an iframe. I guess he's writing a chat so
        it can be a solution.

        --
        -- Álvaro G. Vicario - Burgos, Spain
        -- http://bits.demogracia.com - Mi sitio sobre programación web
        -- Don't e-mail me your questions, post them to the group
        --

        Comment

        Working...