Re: [phplib] current users? From: Layne Weathers (layne <email protected>)
Date: 08/22/01

> For me this is just a point of the iceberg.
> Because after wanting to know how many users are online, you'll
> legitimately want to know also how much did that user stayed
> logged in,
> or the average login time of users, or how frequently users login, and
> other interesting info that you can only get by using a login/logout
> logtable.

When I implemented this, I found I had to collate times. On Windows, most
browsers open new windows as a separate process (with separate session
cookies), so people comparing two pages or doing two different tasks would
have overlapping logins: session 1 from 10 - 1; session 2 from 10:30 to
11:00; total time logged in is 3, not 3.5, hours.

> Then a question could be: how do I know when actually someoe
> logged out?
> there isn't in fact a 'logout' action, I mean and obligate one. Logins
> simply expire. I am not sure of this, but when you fin a login record,
> in that logi/logout logtable, that has no accompanying logout record,
> and the login time is more than expire time,, you can cosider
> him logged
> out.

For my purpose, I chose to count multiple logins on one session id as a
single login. Many times the users would be on a long phone call and auth
would expire. Other people may want to separate the two, so it would be nice
to have the option as a flag in a class extension.

Layne Weathers
Ifworld Inc

-- 
Abbestellen mit Mail an:   phplib-unsubscribe <email protected>
Kommandoliste mit Mail an: phplib-help <email protected>