Background process/multithreading in PHP??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cricketunes@yahoo.com

    Background process/multithreading in PHP??

    Hi Folks,
    I use PHP for a user login application and it works fine. The problem
    is that another process should start up as soon as the user logs in and
    should keep on displaying different popup messages every 5 minutes. Is
    there a way I can implement this using PHP?

    Basically the idea is to get a background process running, thats it.

    thanks
    Cricket

  • Erwin Moller

    #2
    Re: Background process/multithreading in PHP??

    cricketunes@yah oo.com wrote:
    [color=blue]
    > Hi Folks,
    > I use PHP for a user login application and it works fine. The problem
    > is that another process should start up as soon as the user logs in and
    > should keep on displaying different popup messages every 5 minutes. Is
    > there a way I can implement this using PHP?
    >
    > Basically the idea is to get a background process running, thats it.
    >[/color]

    Hi,

    The easiest way to annoy your visitors with popups is javascript.
    You don't need any background PHP process, which don't even exist AFAIK.

    With JS you can easily make a timer that will popup some page every X
    seconds. Beware however that many people have popupblockers, just because
    unsolicited popups are an annoyance.

    Regards,
    Erwin Moller
    [color=blue]
    > thanks
    > Cricket[/color]

    Comment

    • C.

      #3
      Re: Background process/multithreading in PHP??

      PHP is a serverside language. HTTP is a strict client-server stateless
      protocol - a process created serverside can initiate communication with
      the client via HTTP.

      You could create a mini-script and prepend it to every other page
      which:

      1) checks when the user last accessed a page
      2) if its more than 5 minutes ago insert javascript to ctreate the
      popup in the current page

      but beware of messing up the headers from the subsequent page.

      C.

      Comment

      • Sean

        #4
        Re: Background process/multithreading in PHP??

        To output so many pop ups with JavaScript would be impossible, you
        should defiantly use Fortran. That's the ticket. ;)

        Comment

        • Chung Leong

          #5
          Re: Background process/multithreading in PHP??


          Erwin Moller wrote:[color=blue]
          >
          > The easiest way to annoy your visitors with popups is javascript.
          > You don't need any background PHP process, which don't even exist AFAIK.
          >
          > With JS you can easily make a timer that will popup some page every X
          > seconds. Beware however that many people have popupblockers, just because
          > unsolicited popups are an annoyance.[/color]

          That's why one should use in-page DHTML ads instead. They're far harder
          to defeat. Got Javascript disabled? That just means you can't close the
          ad window, sucker!

          Comment

          • Ian

            #6
            Re: Background process/multithreading in PHP??

            Chung Leong wrote:[color=blue]
            > Erwin Moller wrote:
            >[color=green]
            >>The easiest way to annoy your visitors with popups is javascript.
            >>You don't need any background PHP process, which don't even exist AFAIK.
            >>
            >>With JS you can easily make a timer that will popup some page every X
            >>seconds. Beware however that many people have popupblockers, just because
            >>unsolicited popups are an annoyance.[/color]
            >
            >
            > That's why one should use in-page DHTML ads instead. They're far harder
            > to defeat. Got Javascript disabled? That just means you can't close the
            > ad window, sucker!
            >[/color]
            So you use adblock, unless you are stuck with an old browser....

            Ian

            Comment

            • Meião

              #7
              Re: Background process/multithreading in PHP??

              you don't need a background process
              well, if you want to display the popup while the user is navigating,
              just use a Session variable (with the time when the next popup should
              appear).

              Comment

              Working...