Track user existence

Discussion in 'PHP' started by jasvarghese, Dec 14, 2007.

  1. #1
    Hi all,

    i am working on a program basically with individual user area and interfaces. The administrator need to see online users in his area. I was trying with setting up a flag in database while user logs in or out. But this wont work if the user closes the window. So i must find something to check frequently the existence of the users.

    I heard of php sessions which can do frequent checks.. CAn anybody give some details about it?

    What would be the best possible way to do this? Can anyone refer me some articles which describing this?

    All the helps would be greatly appreciated.
    Thanks in Advance...
     
    jasvarghese, Dec 14, 2007 IP
  2. Paul Starsky

    Paul Starsky Peon

    Messages:
    10
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You should store information about every user session in a database and update time on every page loading. So if a session time was updated less then 5 minutes ago that user can be consider be online.
     
    Paul Starsky, Dec 14, 2007 IP
  3. Gawk

    Gawk Peon

    Messages:
    427
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Gawk, Dec 14, 2007 IP