Thread: User online

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    15
    Rep Power
    0
    Ok, I need a little help.
    Or even a point in the right direction.
    I need to be able to tell and post it out to a web page when/who is on my website.
    There is a login screen, a members mysql database, and the rest of the site is php.
    So if you have lead or solution in mind please post, or email.. thanks.

  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    38
    Rep Power
    15
    well, in the database, you could have a field where there is a 1 or a 0 and when they log in, the login page changes it to a 1, then when they log out, it changes it to a 0. Then, just make a PHP page that aut-refreshes and goes through that database looking for all of the "1"s...
    then you should get a pretty accurate record of who's logged in...
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    10
    Rep Power
    0
    Sounds like a good idea, but what if the user doesn't log-out? Most people just close their browser window when they're finished. This is something that I've been wrestling w/ for awhile...and the best solution that I've come up w/ is to add a time-out to the sessions. Does anybody else have a better idea?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    31
    Rep Power
    15
    Well.. Have a small (0 height for example) frame and have it refreshed (by javascript or client pull) and use it to update mysql database. Not a perfect solution, but somewhat better though. And this way you can have session timeout and still have sessions kept up more reliably. (You could also experiment with "session" cookies.)

    ------------------
    Dist - dist@clan-station.org - Founding member of Clan Station
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    15
    Rep Power
    0
    A zero frame with javascript to renew the date/time field is going to have to do.
    Though I know little php, and even less javascript. Would anyone have a snipet of of code I could modify or at least structure from?
    Many thanks,
    Ugalosh

Similar Threads

  1. Can user A read user B's session?
    By Stupid Khor in forum PHP Development
    Replies: 9
    Last Post: May 11th, 2004, 06:19 AM
  2. user authentication and real player files
    By kyawkyaw in forum PHP Development
    Replies: 0
    Last Post: February 12th, 2004, 11:32 PM
  3. php user levels
    By dynasty in forum PHP Development
    Replies: 1
    Last Post: January 20th, 2004, 03:01 PM
  4. How to get multiple sessions for one user working?
    By jkoerber in forum PHP Development
    Replies: 1
    Last Post: January 16th, 2004, 02:23 PM
  5. Is there a drop-in user control module?
    By Kent Wang in forum PHP Development
    Replies: 3
    Last Post: December 20th, 2003, 06:20 AM

IMN logo majestic logo threadwatch logo seochat tools logo