Current location: Hot Scripts Forums » Programming Languages » ASP » users online


users online

Reply
  #1 (permalink)  
Old 08-26-03, 12:11 PM
Stealth Stealth is offline
1337 pr0gr4mm3r
 
Join Date: Jun 2003
Location: Glasgow, Scotland
Posts: 188
Thanks: 0
Thanked 0 Times in 0 Posts
users online

i know how to use global sessions to see how many users are online but how can i see who EXACTLY is online?


cant get my head round it?

i presume i will have to use arrays in the global.asa file? or am i just talking sh!t as usual?
Reply With Quote
  #2 (permalink)  
Old 08-26-03, 12:21 PM
Mister B.'s Avatar
Mister B. Mister B. is offline
Wannabe Coder
 
Join Date: Jul 2003
Posts: 136
Thanks: 0
Thanked 0 Times in 0 Posts
well, couldn't you just make a string in the DB, called logged or whatever, and when they log in, make that true, and when they loggout false?
__________________
God save us from the religious fanatics
Reply With Quote
  #3 (permalink)  
Old 08-26-03, 02:37 PM
Shane Shane is offline
Coding Addict
 
Join Date: Jun 2003
Location: Maryland, US
Posts: 268
Thanks: 0
Thanked 0 Times in 0 Posts
There are a few ways you can do this.

- Use Global.asa file
Inside the Session_Start event, store the session id, username (if there is one), date/time in a table. And then, on the session_end event, delete the row by session_id. I've heard this method is highly unreliable.


- Multiple updates
When the person logs in, or comes to your site, store the session id, username, current date and time in the table. Now, on every page, update that record with the current time and delete all records where the time hasn't been updated in X minutes (i.e 20 minutes) This will get you your listing.


Hope that helps.
__________________
Shane Bauer
Microsoft Certified Professional (MCP) - ASP.NET
ASP/ASP.net, C#, VB/VB.NET, PHP, Perl, SQL
Reply With Quote
  #4 (permalink)  
Old 08-26-03, 04:04 PM
Stealth Stealth is offline
1337 pr0gr4mm3r
 
Join Date: Jun 2003
Location: Glasgow, Scotland
Posts: 188
Thanks: 0
Thanked 0 Times in 0 Posts
i can do it through database but i dont want to push it too far. its used a lot.
To be honest i dont use global.asa a lot but i will try this out m8 thnx
Reply With Quote
  #5 (permalink)  
Old 08-26-03, 04:07 PM
Shane Shane is offline
Coding Addict
 
Join Date: Jun 2003
Location: Maryland, US
Posts: 268
Thanks: 0
Thanked 0 Times in 0 Posts
It won't push it that far. Most sites use the second method. If you are using ASP.NET, you can use ASP.NET's great caching abilities to do some really cool stuff.
__________________
Shane Bauer
Microsoft Certified Professional (MCP) - ASP.NET
ASP/ASP.net, C#, VB/VB.NET, PHP, Perl, SQL
Reply With Quote
  #6 (permalink)  
Old 08-26-03, 04:11 PM
Stealth Stealth is offline
1337 pr0gr4mm3r
 
Join Date: Jun 2003
Location: Glasgow, Scotland
Posts: 188
Thanks: 0
Thanked 0 Times in 0 Posts
never used asp.net but ive been meaning to learn.

Is it poss to integrate it with ASP?


in fact hell with it. Site will just have to handle it lol
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chat online pk_jsp New Members & Introductions 3 09-09-04 08:53 PM
managing linux users from php asinclair PHP 0 09-22-03 06:08 AM
Creating online catalogue ryk Script Requests 1 09-06-03 10:39 AM
A good online MSSQL database editor MadDog Script Requests 2 08-18-03 08:55 PM
[ Wanted ] Who's online Script redspider ASP 5 06-13-03 07:44 PM


All times are GMT -5. The time now is 03:19 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.