>  On May 20, 2006, at 6:31 PM, [EMAIL PROTECTED] wrote:
>
> > I'd like to add a "who's online" section to my home made forum.
> > When a user logs-in they are given a session $_SESSION['user']
> > (containing their username) for the duration of their stay.
> >
> > How can I use PHP to list all of the currently active 'user' 
> sessions
> > that the system has created?
>
>> On 21 May 2006, at 10:56, Mike Brandonisio wrote:
>>
>> You'll have to write your data to a table since other users will have
>> query the table to count how many entries are live. You'll also have
>> to figure out how to deal with people who leave the site.

OK, I can deal with that by adding a "last active" column to the user 
table & a function that writes in the date/time.
The function can be called on every page & if the date/time for the 
user is older than 10 mins I can assume they are logged out.

Does that sound reasonable?

What about browsing guests - not logged in - any suggestions on how I 
should deal with them?

cheers
riquez


Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list




SPONSORED LINKS
Php mysql Job postings


YAHOO! GROUPS LINKS




Reply via email to