RE: trying to figure out the best/efficient way to tell whois logged into a site..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i kind of get this!!!

however, no one has been able to point me to any kind of code sample/site
that actually illustrates how to do this. even from a psuedo code
implementation.

and as far as i can tell, i still don't have a way of knowing when a session
is valid/alive. the session handler articles i've seen talk to
writing/maintaining sessions in a db.. and the also talk about destroying
the session vars from the db. however, no article that i've run across has
discussed how you know, or can determine for a given session, whether it's
valid or not from accessing the session handler db.

my question is still how do i determine for a given session, that a user is
still on the site, or that the user is no longer on the site/system. i don't
see an automated/system way of doing this.

it appears that i might have to capture the session vars in a db, along with
the associated time creation. it then appears that i'm going to have to have
some way of continually updating the session 'time' to reflect that the user
is still on the system/site. this kind of approach could be done via some
include file for every page that the user hits on the site. i could then
trigger off this to determine who's live/on the site.

the downside to this is that i could kill someone who might be on the
system, but just not actively using the site.. maybe they stepped away...

now, if there was/is away to examine the session var that i store using the
session handler, such that i could determine which session var is still
alaive.. then that would solve my issues!!!!

however, as i've stated, i can't find any code sample/articles that get to
this point..

any code/thoughts/comments/etc...

-bruce


-----Original Message-----
From: Ben [mailto:ben@xxxxxxxxxxxxxxxxx]
Sent: Tuesday, September 13, 2005 5:24 PM
To: php-general@xxxxxxxxxxxxx
Subject: Re:  trying to figure out the best/efficient way to tell
whois logged into a site..


bruce wrote:

> as an exercise, i took a look at mambo (the cms) and realized that it
> doesn't handle users who simply shut down their browser while on the
> system...
>
> thoughts/comments...

The only way to deal with such situations is through a garbage
collection routine that periodically deletes or marks as stale records
for users who haven't requested a new page within a set period of time.

- Ben

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

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux