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

Join Date: May 2005
Posts: 13
Reputation: missdiva is an unknown quantity at this point 
Solved Threads: 0
missdiva's Avatar
missdiva missdiva is offline Offline
Newbie Poster

hit counters

 
0
  #1
May 23rd, 2005
hello can anyone tell me how to make my own hit counter?
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,043
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 128
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is online now Online
The Queen of DaniWeb

Re: hit counters

 
0
  #2
May 23rd, 2005
Unfortunately you can't make a hit counter in either JavaScript or DHTML (and I'm assuming that's what you wanted to do, since you posted in the JavaScript and DHTML forum). You see, a hit counter needs some way of keeping track of how many hits you've received so far - this can be either in a database or in a plain text file kept on the server. JS and DHTML are both client-side languages, which means they're executed in the web surfer's browser, and not on the server. Therefore, they don't have access to write to files.

Instead, they're used to do fancy menus and those types of ornamental bells and whistles. For a hit counter, you will need a server-side language such as PHP, for example.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
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