Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Session Ended

  1. #1
    New Coder
    Join Date
    May 2004
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Session Ended

    Hello,

    As a relative newbie, Im writing a forum script to get some more practice in. Ive mangaed to get a php session started, but I was wondering how you detect the session being terminated?

    What Im trying to achive is a list of the users who are currently logged in.

    Thank you! Ian.

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,040
    Thanks
    10
    Thanked 92 Times in 90 Posts
    the only reliable way to spot a user has ended a session without logging out is to keep track of sessions in a DB/flatfile & periodically clean that table out , e.g. everytime $user1 is spotted , update your db to note the time $user1 was spotted , then check for all users who have not been `spotted` for the last $x minutes and remove them from the DB.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    New Coder
    Join Date
    May 2004
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Many thanks...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •