How to count the no. of hits on the website.

Posted on 2013-02-02
Last Modified: 2013-02-21
1. How to determine no. of visitors visiting the site.
2. How to determine the ip address of the client machine from where the site was accessed.
3. What is code for implementing Visitors Count logic.
Question by:searchsanjaysharma
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

esolve earned 167 total points
ID: 38846871
You can use this on your website to determine the visitors IP address:


For the visitorCount you can use the Application_BeginRequest event in global.asax. See this link. or you can use a free jscript visitor counter

Some more examples here:
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 166 total points
ID: 38847015
The best choice is to use AWStats or a similar program that gets all that info from your server logs.  It is open source and you can get the code for it.
LVL 10

Assisted Solution

by:Monica P
Monica P earned 167 total points
ID: 38850306
Visitors Count

To get client IP

To get the IP address of the machine and not the proxy use the following code

Open in new window


Author Closing Comment

ID: 38914018

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question ( here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question