Killersites.com Homepage Welcome Guest   |   Register  |  Login
Login Name Password
  Search  
  Index  | Recent Threads  | Unanswered Threads  | Who's Online  | User List  | Help



Quick Go »

No member browsing this thread
Thread Status: Active
Total posts in this thread: 2
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 2089 times and has 1 reply Next Thread
Male may29adil
Stranger




Joined: Apr 28, 2008
Post Count: 1
Status: Offline
Reply to this Post  Reply with Quote 
Get Active Userlist

Hello,
I am looking for the code to get the active guest user and login members list to display on my website as in this forum you can see how many guest users and there and how many login members are there

for more example see view this
Total Guest Online (15)
Members Online
Adil
David
May
Johan
Abc

so please help me for that.

Thanks
Adil Irshad

[Apr 28, 2008 10:57:39 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Male monkeysaurus
Advanced Member
Member's Avatar


Joined: Sep 26, 2006
Post Count: 187
Status: Offline
Reply to this Post  Reply with Quote 
Re: Get Active Userlist

Hello Adil,

Most off the shelf forum packages will be able to do that already - if you are using one, which one?

If you're writing your own forum (not sure why you would, unless you're a masochist!) you would need to have a field in each row of the users table - call it logged_in or something like that. Simply change the value of this to true / false as your users log in and out. When a page is generated for the user, pull all the usernames where logged_in=true, store them in an array and output them however you like.

As for guests, that's a bit trickier. If you're using asp.net, you could possibly store a list of IP numbers in an application variable...I'll need to have a think about that one. Anyone else got a better idea? confused
----------------------------------------
John McCollum
http://johnmccollum.co.uk
[Apr 28, 2008 4:49:43 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread