On Thu, June 8, 2006 9:24 am, kartikay malhotra wrote:
> Is there a way for the server to notify the client about an event,
> provided
> the client was online in the past X minutes?
>
> To elaborate:
>
> A client comes online. A script PHP executes (serves the client), and
> terminates. Now if a new event occurs, how can the server notify the
> client
> about that event?

Keep a table of "notifications" and what time they happened, and if
the user has seen them -- perhaps even allowing the user to choose
which ones to dismiss, perhaps even only having a little icon about
notifications if there are any...

When the users hits a page, check the notifications table for things
they ought to know about.

The exact rules of how/when to do what is up to you and your users,
but give it a lot of thought before you go annoying the [bleep] out of
users with a damn popup for each notification stacked up or
something... :-)

This takes a lot more thought about WHAT to do from a
process/user-interface side than HOW to code it in PHP.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to