User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 401,441 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,888 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 4265 | Replies: 2
Reply
Join Date: Apr 2005
Posts: 5
Reputation: Sukuz is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Sukuz Sukuz is offline Offline
Newbie Poster

Creating Hit Counters for a website

  #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).
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 107
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: Creating Hit Counters for a website

  #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  
Join Date: Apr 2005
Posts: 5
Reputation: Sukuz is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Sukuz Sukuz is offline Offline
Newbie Poster

Re: Creating Hit Counters for a website

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 12:56 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC