Click here to Skip to main content
14,767,278 members
Please Sign up or sign in to vote.
3.50/5 (2 votes)
See more:
I'm doing project in
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.

Updated 30-Jan-13 16:01pm
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.
Abhishek Pant 25-Jan-13 1:20am

Read this blog
Provide information it will give you code to generate counter logic[^]

Or follow this google search,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
Abhinav S 30-Jan-13 0:15am
More links
RDBurmon 30-Jan-13 0:17am
Prasad_Kulkarni 30-Jan-13 1:25am
Even more, +5!
Abhinav S 30-Jan-13 1:43am
Thank you.
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