Results 1 to 6 of 6

Thread: Active Users

  1. #1
    Junior Member Aeric's Avatar
    Join Date
    Nov 06
    Posts
    27

    Question Active Users

    Hello, I want to make something like vbulletin forum where i can display the Active guests/visitors and Members. When click, I can see a table listing their IP, how long they online, last active and currently in which page. I think it is using array and not using Global.asa. Hope someone could help. Thanks.

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 02
    Location
    Bristol, UK
    Posts
    35,562

    Re: Active Users

    vBulletin (and other forum software) dont use arrays or Global.asa.. what they use is databases.

    All the details of threads/posts/users/logins/... are stored in the database, and the software displays this in relevant ways. For the "active users" list the details are collected from the database (using a relatively simple query) and displayed in an appropriate way.

  3. #3
    Junior Member Aeric's Avatar
    Join Date
    Nov 06
    Posts
    27

    Re: Active Users

    I am using ASP.
    Can you give me some sample codes which I can refer to?
    I have some samples but they won't update the Active user list when a user session ends. How to retrieve the list where the users were active for past 20 minutes?

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 02
    Location
    Bristol, UK
    Posts
    35,562

    Re: Active Users

    I'm afraid I cant give you any sample code, as I don't have anything relevant! (and dont have ASP set up on this computer either)

    As to updating the Active user list, how are you currently storing/working with the list of users and what they are doing? The Active user list is just a formatted output of this data - so it shouldn't be too hard to work out a way of showing it, assuming of course you have the relevant data.

  5. #5
    Junior Member Aeric's Avatar
    Join Date
    Nov 06
    Posts
    27

    Re: Active Users

    Maybe i need some ideas or concepts of Session variables which I am not very clear. Let me explain what I understand.

    I need 2 relevant Database tables,
    User (User ID, Password)
    Session (ID, IP, LastLoginTime, LastURL)

    What and how many variables should I use to count the active users and check whether the user is a member in table User?

    How to add active users into table Session? I mean, is it we put an SQL Insert inside default.asp where the Session is not inside the table Session? Do I need to add a field named SessionID inside table SessionID? How to generate this Session variable for each user? Is there any problem if more than one users are log in using same User ID at the same time?

  6. #6
    Bahamas Mon
    Join Date
    May 06
    Location
    Nassau, Bahamas
    Posts
    2,989

    Re: Active Users

    If the site is not a member site (people dont login etc), then yes it would be Application Variables. Or you could still use a Database to track them, or better yet a text file. I prefer text files over both of those other 2, but for larger queries a database is best.

Posting Permissions

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