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

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

 



ok....

still have questions regarding how to handle a user/session of a user who
kills their browser. in this case, the user's session information would
still be in the db for the session handler...

am i correct in understanding/assuming that i could iterate through the list
of sessions in the session handler, and the session information for users
who aren't on the site, will essentially be invalid???

also, i'm trying to get my hands around the garbage collection function, as
it relates to users who aren't on the system any more...

information that i've seen in the articles haven't given me insight for this
isssue... if i can see how to deal with this situation, then i can craft a
way for an admin to more or less be able to generate a list of users/people
who are actually on the system/site.

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...

-bruce


-----Original Message-----
From: Philip Hallstrom [mailto:php@xxxxxxxxxxxxxxx]
Sent: Tuesday, September 13, 2005 3:43 PM
To: bruce
Cc: juzamjedi@xxxxxxxxx; php-general@xxxxxxxxxxxxx
Subject: RE:  trying to figure out the best/efficient way to tell
who is logged into a site..


> any code/pointers to this...
>
> i've been doing the google/search thing and haven't come across anything
> which relates to what i'm searching for...
>
> so.. any help in this area would be greatly appreciated!!
>
> i would have thought there would be articles/open course code/apps on
this!!
>
> -thanks
>
> bruce

http://www.php.net/manual/en/function.session-set-save-handler.php

Also try zend.com in the tips/articles/code-snippets section.

>
>
> -----Original Message-----
> From: Jason Barnett [mailto:juzamjedi@xxxxxxxxx]
> Sent: Tuesday, September 13, 2005 2:25 PM
> Cc: php-general@xxxxxxxxxxxxx
> Subject: Re:  trying to figure out the best/efficient way to tell
> who is logged into a site..
>
>
> Close: You mix both of these ideas.
>
> Create a custom session handler. This handler creates user entries in a
> database. Then when you want to know how many are online you do a count on
> the number of user entries in the table. Play around with different
> gc_probability values to tune the efficiency.
>
>
>
> On 9/13/05, bruce <bedouglas@xxxxxxxxxxxxx> wrote:
>>
>> hi...
>>
>> anybody have pointers to trying to tell who/how long someone is logged
>> into
>> a system/site. i've thought about setting a session var, but i'm not sure
>> how to read/tabulate this var across the entire group of people who'd be
>> logged in. i've also thought about keeping track in a db tbl.. however,
>> i'm
>> still not sure that i've got a good way of tracking who's logged in, and
>> still on...
>>
>> a possible approach would be to have the app periodically update the
>> system
>> whenever a logged in user goes from page to page...
>>
>> so, any thoughts/ideas/etc...
>>
>> -thanks
>>
>> bruce
>> bedouglas@xxxxxxxxxxxxx
>>
>> --
>> 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
>

-- 
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