SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2007
    Location
    Miami, FL
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sessions, sessions, sessions!

    Does anyone know of a thorough guide to messing about with sessions? There are certain things I'd like to do which would require using sessions to determine things. For instance, if I'm logged into the site I would like others to know that I'm logged in as well. I'm guessing session data would be used to determine whether or not the user is actually logged in, but how can I determine when the session ends (let's say, closes the browser, not necessarily clicks the log out option) to remove their online status?

    There are more things I'd like to do, but the only thing I seem to know how to do with sessions is set an expire date and grab the logged in user. I don't know how to do something like visit someone's profile and find out if they're logged in by finding if they have an active session using their user_id. Any ideas? Thanks!
    http://shownd.com - Your free online design portfolio.
    http://rehashclothes.com - Swap your clothes.
    http://orpheuxdesign.com - My design studio.

  2. #2
    SitePoint Addict ruby-lang's Avatar
    Join Date
    Aug 2007
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think the only thing you can do is keep track of the last time they hit your site and assume that if it's been in, say, the last five minutes, they are still online.


Bookmarks

Posting Permissions

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