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.
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.
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?
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.
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?
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.