Click to See Complete Forum and Search --> : Counter?
hpl
Apr 13th, 2005, 06:55 AM
I am about to make a counter with asp.net something like this:
http://www.nedstatbasic.net/s?tab=1&link=1&id=1738633
I need information from the user on:
- IP address
- Domain name (e.g. Tele Danmark, Denmark)
- Country
- Date & Time
Can I get this information importing the System.IO?
If true, how do I do that?
dj4uk
Apr 13th, 2005, 08:23 AM
Generally speaking the webhost will have a stats package installed that you can use. There are also several free ones that work off the web server log files too - off the top of my head AWStats is one freebie!
If you want to track things yourself you could have a user control that logs details in a text file or database when it is loaded. The date and time would be obviously DateTime.Now. The users IP address can be returned from Request.ServerVariables["REMOTE_ADDR"]. You would need a third party service to determine the location of the user and its not always 100% accurate. Try out http://www.locateip.com/.
Remember we are talking about counting requests here so if I view a page twice it counts as 2 requests. You might want to look into tracking sessions instead of request - its a more useful measurement!
HTH
DJ
Patch21
Apr 13th, 2005, 11:05 AM
check out http://www.statcounter.org as well
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.