how to know how many people are online?

 
Post new topic   Reply to topic    Aprelium Forum Index -> Classic ASP
View previous topic :: View next topic  
Author Message
gingel
-


Joined: 09 Apr 2004
Posts: 25

PostPosted: Sun Sep 16, 2007 3:46 pm    Post subject: how to know how many people are online? Reply with quote

i know i need to use Global.asa but it's not fully supported by Activehtml.

anyone have an idea on how to do that?


Erez.
Back to top View user's profile Send private message ICQ Number
pkSML
-


Joined: 29 May 2006
Posts: 876
Location: Michigan, USA

PostPosted: Sun Sep 16, 2007 7:07 pm    Post subject: Reply with quote

There's a simple solution for you if you host only one domain.

Automatically assign a persistent session that lasts for, say, 15 minutes. That assumes you consider a person's online presence for 15 minutes after their last request.
Then just count the sessions in the server directory that holds session information.

Otherwise, here's the concept:
Make a table, whether it exists in a file or in a database.
This table stores records like: IP.address|timestamp.
For every web request (good to put this code in your global file), compare the IP address with the list in the table. Then see if it has been in the past 15 minutes. If not, record them at the top of the table.
Also, for every request, count the number of IP addresses that have accessed your in the past 15 minutes.

I don't know anything about ASP, but I imagine you could find such script already made: http://stephen.calvarybucyrus.org/search/asp+online+user+counter
_________________
Stephen
Need a LitlURL?


http://CodeBin.yi.org
Back to top View user's profile Send private message Visit poster's website
rrinc
-


Joined: 24 Feb 2006
Posts: 725
Location: Arkansas, USA

PostPosted: Sun Sep 16, 2007 10:06 pm    Post subject: Reply with quote

You could create a session handler that uses a database, that's probably the best way.

Edit: I was talking about PHP, sorry. Not sure if you can do it in ASP too.
_________________
-Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados.


Last edited by rrinc on Mon Sep 17, 2007 11:14 pm; edited 1 time in total
Back to top View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
gingel
-


Joined: 09 Apr 2004
Posts: 25

PostPosted: Mon Sep 17, 2007 9:21 pm    Post subject: Reply with quote

how do i count the sessions in the server directory that holds session information?
Back to top View user's profile Send private message ICQ Number
pkSML
-


Joined: 29 May 2006
Posts: 876
Location: Michigan, USA

PostPosted: Mon Sep 17, 2007 9:50 pm    Post subject: Reply with quote

Get a directory listing. It should give you a count. On the specifics, it depends on your operating system.
_________________
Stephen
Need a LitlURL?


http://CodeBin.yi.org
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Classic ASP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group