Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Listing of online users

Guest
Oct 03, 2006 Oct 03, 2006
Hi all,
I have been asked to produce a page (using asp - prefereably javascript, but VBScript will suffice) that shows details of all users currently logged into our website. These details should include, amongst other things, their login time and values stored in session variables, such as their full name and company name. Details on the page should be updated at intervals of 1 minute and/or each time the page is refreshed.

I'm not entirely sure how to go about retrieving the information from the server. I can retrieve the SessionID for the currently logged-in user, but how do I build a list of all logged-in users and associate other session variables with their SessionID? Is this the right approach or is there an easier way that doesn't involve re-inventing the wheel?

Any help appreciated.

Regards,

Ben.
TOPICS
Server side applications
334
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 04, 2006 Oct 04, 2006
You could have an extra field in your Users table called LoggedIn. When a
user logs in, you could update this field to True. So, in your recordset,
you could show your logged in users:

select * from Users where Loggin=true

Also, I've a demo on an alternative method:

http://www.charon.co.uk/content.aspx?CategoryID=27&ArticleID=39

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004




Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 04, 2006 Oct 04, 2006
what happens if they don't log out? they often just close their browser
or go straight to another site without properly logging-out.

Julian Roberts wrote:
> You could have an extra field in your Users table called LoggedIn. When a
> user logs in, you could update this field to True. So, in your recordset,
> you could show your logged in users:
>
> select * from Users where Loggin=true
>
> Also, I've a demo on an alternative method:
>
> http://www.charon.co.uk/content.aspx?CategoryID=27&ArticleID=39
>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 04, 2006 Oct 04, 2006
nevermind. i found it in your linked article.

"2. Users are removed from the file that haven't visited a page in the
last 5 minutes"

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 04, 2006 Oct 04, 2006
LATEST
The Session_Onend event in global.asa can be used to update the database.

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004



Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines