WEB PHP Crew: an advanced question about sessions.

Discussion in 'OT Technology' started by brds, Dec 18, 2007.

  1. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,637
    Likes Received:
    12
    Location:
    Atlanta
    I'm making a site and would like to know how many users are logged in at any given time (kind of like OT). Is there a way I can see how many different sessions are open on the site so i can get a user count?
     
  2. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,637
    Likes Received:
    12
    Location:
    Atlanta
    Well i can find scripts... i just like to do things myself. I was just asking if anybody knew a simple way to do it. But thanks for the link to the scripts. I'll have to read through a couple of them...

    nice googling talents btw
     
  3. projectalpha

    projectalpha 二號 Stunna

    Joined:
    Aug 4, 2001
    Messages:
    17,671
    Likes Received:
    0
    Location:
    Bay Area, California
    If you have a users table, just select count whoever where logged in = yes and where their last activity wasn't more than a certain amount of time ago.
     
  4. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,914
    Likes Received:
    8
    Location:
    Los Angeles
    A quick 5 minute hack would store usernames in a session then output the session array. :dunno:
     
  5. noon

    noon get high and teach me how to listen

    Joined:
    May 4, 2002
    Messages:
    3,384
    Likes Received:
    0
    Location:
    Lawrence, KS
    do you have a user system in place right now?

    if you do, it is very easy
     

Share This Page