stonecolddevin has asked for the wisdom of the Perl Monks concerning the following question:
Hey everyone.
I'm attempting to write a system that manages user sessions for a website where users can post their school notes.
Currently, I'm trying to display the number of viewers "lurking" (aka "Guests"), and display the username for each user that is logged in (their name dissappears from the list after they log out or their session expires, not exactly a new idea.).
I'm having a heck of a time trying to figure this section out. I'm using CGI::Session, and am probably going to migrate to Apache::Session. However, this doesn't solve the problem of figuring out how to
A) Insert user's information that are logged on into a database table,
B) expire their session/set their logged_in parameter to '0',
C) Pull the above two together so that I have something similar to what perlmonks has ("Other users lurking in the monastery"), along with a count of guests with active sessions ("Guests online: $Number").
Part A's fairly easy, but I need to design part A so it's compatible with part B and C.
My main goal is to avoid redundancy. I want to expire the session stuff once, not have to expire a session file/database record, and the stuff in the table for users online.
I'm tired, and I've tried all of what I know to exhaustion. Any ideas, wise monks?
|
|---|