Click here to Skip to main content
15,885,868 members
Please Sign up or sign in to vote.
3.50/5 (2 votes)
See more:
Hi,
I'm doing project in asp.net
I want to do count the number of visitors: online, today, yesterday, this week, last week, this month, last month and total.
I want to use the procedure (or write one class to handle the better), you can help me?
Ah, online, total I have seen many people with global processing, but I see it's not really accurate. People can help me handle it by calculating the IP address?

<!-- Supplement -->
I want code can be count number of visitors online ,today, yesterday, this week, last week, this month, last month and total.
The reason I want do it for "IP address" because when using global to save file access number is still increasing even if only one person online(use two or more different browsers at the same time). -> Thus it is clear that the number of visitors at it's fake, inaccurate.
Moreover, when one person out of the site, the session does not take away that it takes one a long time (even if you have configured in the webconfig using sessionstate). -> I want one person out of the website, Session lost immediately when refresh the page.

Therefore I want to use the IP address of each computer to control the amount of access to more accurate.

Thanks.
Posted
Updated 30-Jan-13 15:01pm
v7
Comments
PIEBALDconsult 24-Jan-13 22:09pm    
"the ip address"

That's not terribly accurate, due to shared systems and DHCP.
vinodkumarnie 24-Jan-13 22:45pm    
R u sure u want to do it for "IP Adress"...? I will provide u the code...

But in online application IP adress will vary in each time..
thanhbinh00 28-Jan-13 21:37pm    
Can you share the code to handle it?
Sergey Alexandrovich Kryukov 24-Jan-13 23:08pm    
What do you mean "with global processing"? Anyway, how do you want to define, what is a distinct visitor? This and only this is a real problem... The only reliable way to tell a distinct visitor can be based on authentication.
—SA
Abhishek Pant 25-Jan-13 1:20am    
http://www.hongkiat.com/blog/top-14-free-web-statistics-tools/

Read this blog
Provide information it will give you code to generate counter logic
http://www.hit-counts.com/[^]

Or follow this google search
http://www.google.co.in/#hl=en&tbo=d&sclient=psy-ab&q=visit+counter+for+website&oq=Visit+counter+&gs_l=hp.3.0.0l4.2393.5506.0.6969.14.11.0.3.3.0.505.2501.0j6j4j5-1.11.0.les%3B..0.0...1c.1.kyvhbj8MS6E&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&bvm=bv.41524429,d.bmk&fp=39ca3a13ecaabac5&biw=1366&bih=674[^]


Hope this helps if yes then accept and vote this answer otherwise revert back with your queries
--RDBurmon
 
Share this answer
 
Comments
Abhinav S 30-Jan-13 0:15am    
More links
5.
RDBurmon 30-Jan-13 0:17am    
Thanks
 
Share this answer
 
Comments
Prasad_Kulkarni 30-Jan-13 1:25am    
Even more, +5!
Abhinav S 30-Jan-13 1:43am    
Thank you.
 
Share this answer
 
Comments
Abhinav S 30-Jan-13 0:15am    
Good links. 5.
Prasad_Kulkarni 30-Jan-13 1:25am    
Thank you Abhinav! :D

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900