Click here to Skip to main content
13,550,059 members

count the number of visitors?

thanhbinh00 asked:

Open original thread
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.



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the The Code Project Open License (CPOL).

Advertise | Privacy |
Web02-2016 | 2.8.180515.1 | Last Updated 26 Mar 2009
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100