#1
  1. No Profile Picture
    Robert_J_Sherman
    Guest
    Devshed Newbie (0 - 499 posts)
    Okay, haven't done this before, and have an idea of what I will want to do to make it work.

    Here's real question.

    I want to have something on the page that says "X users logged in"..

    So, to do this, I intend to use a MySQL table which records the users as they login.

    My Question, is what would you recommend to ensure the user is still logged in?

    The site would have a log out button, this would remove them from the "logged" table of the db... but we can't rely on a user to "logout"..

    Again, I haven't done this thing before, so... I need a little assistance, or advice.

    Thanks a bunch!

    ------------------
    SnR Graphics,
    Low Cost Hosting and Web Development.
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    <<
    The site would have a log out button, this would remove them from the "logged" table of the db... but we can't rely on a user to "logout"..
    >>


    Hi Mr.Robert,
    my suggestion is that if a user is not logging out after 30 minutes or something then program should make him logged out(i mean to say that if a user is not using log out option).i hope you are planning to have a field called date and time for saving 'logging' time of a user..so you can achive this very easily...

    ------------

    ------------------
    SR -
    webshiju.com
    www.jobxyz.com-IT Career Portal
    ezipindia.com--WebStudio


    "The fear of the LORD is the beginning of knowledge..."
  4. #3
  5. No Profile Picture
    Robert_J_Sherman
    Guest
    Devshed Newbie (0 - 499 posts)
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by Shiju Rajan:

    <<
    The site would have a log out button, this would remove them from the "logged" table of the db... but we can't rely on a user to "logout"..
    >>


    Hi Mr.Robert,
    my suggestion is that if a user is not logging out after 30 minutes or something then program should make him logged out(i mean to say that if a user is not using log out option).i hope you are planning to have a field called date and time for saving 'logging' time of a user..so you can achive this very easily...

    ------------

    [/quote]

    Yes, at the very least I had figured I would need a "time-in" column.. something to compare the current time with.

    What I'm really wondering isn't how to track them while they are connected to the site, but how to detect the loss of the connection.. if they close the browser, etc..

    In short, I'm wanting to be able to show a count on the entry page of the site, which indicates "how many" members are currently logged into the site.. a number that's pretty much a very accurate count.

    So, in effect, I am looking to use the table to maintain the count of logged users.. I would have to have a way to verify that each members' connection is active.. if not then remove them from the db's counting table.

    So, I would not only need a time-in column but an IP column.. and a method to poll/ping that IP for an active connection to the site.

    Problem area there would be like Firewalls, which stealth a users system.


    ------------------
    SnR Graphics,
    Low Cost Hosting and Web Development.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    UK
    Posts
    9
    Rep Power
    0
    PHPLib has some kind of session tracking functions in it. I haven't had a close look but I would suggest checking it out at http://www.phplib.net.

    ------------------
    --
    Mark Ogden
    http://homepage.ntlworld.com/pogden

Similar Threads

  1. Creating Unique "Home Pages" for users that are logged in??
    By $phpNewbie in forum PHP Development
    Replies: 11
    Last Post: February 17th, 2004, 10:11 AM
  2. Replies: 0
    Last Post: January 27th, 2004, 10:16 AM
  3. how to manage users mail in Lan?
    By devshedMpr in forum Mail Server Help
    Replies: 0
    Last Post: October 31st, 2003, 06:02 PM
  4. List users on NT domain from a command line.
    By Hawk521 in forum Windows Help
    Replies: 1
    Last Post: October 27th, 2003, 02:55 PM
  5. List users
    By Fermat in forum MySQL Help
    Replies: 1
    Last Post: September 28th, 2003, 01:40 PM

IMN logo majestic logo threadwatch logo seochat tools logo