Creating Hit Counters for a website

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Apr 2005
Posts: 5
Reputation: Sukuz is an unknown quantity at this point 
Solved Threads: 0
Sukuz Sukuz is offline Offline
Newbie Poster

Creating Hit Counters for a website

 
0
  #1
Apr 27th, 2005
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).
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: Creating Hit Counters for a website

 
0
  #2
Apr 27th, 2005
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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 5
Reputation: Sukuz is an unknown quantity at this point 
Solved Threads: 0
Sukuz Sukuz is offline Offline
Newbie Poster

Re: Creating Hit Counters for a website

 
0
  #3
May 4th, 2005
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC