QUOTE (HTML_Guru @ Sep 6 2005, 10:05 PM)
I believe this belongs, so I'm posting it here
--------------------------------------------------
I was wonderng for anyone who can help... I've been making websites and things like that for a couple of years, but through my time, I have never taken the time to make my own counter. In all the cases, I simply found some advertised counter and put it in my site. And while that isn't a bad idea, I would like to make my own, customizable counter, that's all my own. If anyone has any ideas on how to make a cool counter, or even perhaps just a starter counter, that would be great.
My preference, by the way, would be some counter that was
1. mini
2. tidy
3. futuristic.
If there's someone who's knowledgeable enough in the subject to give some advice, that would be great.
Thanks!
Well you're pretty close on this one so we'll just put you on the right track.

Because JavaScript is a client side script, it isn't able to keep a running count of page views. JavaScript has no way of writting information to a file on the server where a count file or database would be hosted.
The easiest way is to have a small text file with one line of information on it (the current count that is) and a script file that reads the count file and increaces the count each view and displays the count.
Because of the before mention limitations in JavaScript, you'll need to use a server side script or cgi. While php would be the easiest way to learn this; C, C++, Perl, Java, VB, etc. could all be used.
Here are 2 tutorials in PHP that may help.
Flat File counter:
http://www.astahost.com/how-make-counter-t858.htmlMySQL counter:
http://www.astahost.com/php-hit-counter-t1013.htmlAdditionally, you'll find a lot of good information about PHP here:
http://www.astahost.com/php-f168.htmlAdditionally, I'd like to let everyone know that we just recently added a tutorial request forum here:
http://www.astahost.com/how-s-tutorial-req...oints-f192.htmlWell, I hope that this will get you on your way now.
Happy Counting.

vujsa
Comment/Reply (w/o sign-up)