954,600 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Creating Hit Counters for a website

HI!!,
can anybody tell me how to create a hit counter using Javascript.
The hit counter should increment a number stored in a file (on the site) each time a user visits it.

For reference such Hit Counters can be added to Websites built with Microsoft Frontapage (Tools -> Web Components -> Hit Counter).

Sukuz
Newbie Poster
5 posts since Apr 2005
Reputation Points: 10
Solved Threads: 0
 

Well, With javascript it is going to require you to use cookies. You send the browser a cookie, with the value as the number of visits. Next time they return, read the cookie, increment it, and over-write the cookie with the new value. In order to do something like this SERVER SIDE, you'll need a server side language, such as perl, php, or some other server side programming language.

Comatose
Taboo Programmer
Team Colleague
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215
 

Thanks Comatose!!!
But, what I want to know is give me some code to implement this in SERVER side using PHP, PERL,etc and how to apply it.

Sukuz
Newbie Poster
5 posts since Apr 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You