Author |
Topic |
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 25 April 2005 : 11:22:25
|
I´m use the following to count daily users, but it doesn´t reset at 00.00 (midnight), is there something wrong with the code? Btw, is it possible to exclude IPs in Global.asa?
<SCRIPT LANGUAGE=VBScript RUNAT=Server> Sub Session_OnStart ' Lock the Application object Application.Lock ' Increment the count Application("VisitorsToday") = Application("VisitorsToday") + 1 ' Unlock the Application object Application.Unlock End Sub </SCRIPT> |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 25 April 2005 : 11:27:32
|
There's nothing in there that checks for the change of day. Download the Active Users Lite mod and see how it handles the change of day.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 25 April 2005 : 11:37:36
|
Thanks |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 25 April 2005 : 12:09:31
|
You're welcome
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
pdrg
Support Moderator
United Kingdom
2897 Posts |
Posted - 27 April 2005 : 10:57:29
|
is it a globally used forum? Or just Denmark?
'Today' is a bit of a moveable feast in this connected world ;-) |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 27 April 2005 : 11:20:53
|
As long as it's consistent with Wii's forum's time, that shouldn't be a problem, though.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
pdrg
Support Moderator
United Kingdom
2897 Posts |
Posted - 27 April 2005 : 12:24:14
|
Agreed - just if I'm in NY, for instance, a Denmark midnight reset would be 7pm (roughly), so 'zero posts today' could be confusing.
No technical reason why not, just I live in a very international company, and it's one of my bugbears that ppl in some countries (one in particular, the arrogant one) can't figure timezones - strange for a country spanning several. rant over ;-) |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 27 April 2005 : 12:52:10
|
Maybe it's a personal thing but, if I visit a website outside my own timezone, I expect it to see timestamps and stats displayed according to that timezone. While I appreciate those sites that do allow me to select my timezone, I know how difficult such a feature is to code especially when applying it to a global.asa file.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 27 April 2005 : 17:28:51
|
It´s not forum related, and both server and site is in Denmark, but it still doesn´t reset at 24.00 - not sure when, I can´t stay up all night long to see when it happens. |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 28 April 2005 : 05:52:45
|
I know it's in Denmark but is the server's clock set to the correct timezone?
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 28 April 2005 : 06:18:00
|
Yes ! |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 28 April 2005 : 06:23:15
|
Ah, well, that could've been one answer! Not too familiar with global.asa files but could you set it up to send you an e-mail when it does reset, that way you could determine the time.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 28 April 2005 : 06:25:04
|
Good idea, what would be the code for that ? |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 28 April 2005 : 06:30:34
|
Dunno; as I said, I'm not that familiar with global.asa files. Try using a standard e-mail sending script wrapped in the if statement you have to check for the change of day.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
wii
Free ASP Hosts Moderator
Denmark
2632 Posts |
Posted - 28 April 2005 : 06:32:06
|
I´ll see what I can do.
Thanks |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 28 April 2005 : 06:40:18
|
No problemo; let me know how you get on.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
Topic |
|