DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   JavaScript / DHTML / AJAX (http://www.daniweb.com/forums/forum117.html)
-   -   Creating Hit Counters for a website (http://www.daniweb.com/forums/thread22649.html)

Sukuz Apr 27th, 2005 10:29 am
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).

Comatose Apr 27th, 2005 11:47 am
Re: Creating Hit Counters for a website
 
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.

Sukuz May 4th, 2005 11:48 am
Re: Creating Hit Counters for a website
 
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.


All times are GMT -4. The time now is 3:45 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC