Log in

View Full Version : Hit counter?



Sliight
07-27-2007, 11:46 PM
Can anyone recommend a good hit counter? Should I go with one of the free services that links to a page? I assume they do this for the backlink...

Are there stand alone hit counters?

My domain host has "stats" but it doesn't really break down true hits for my home page.

Thank you!

francinehds
07-28-2007, 03:40 AM
I have no idea, I'm looking for one too. I've checked out a couple of those "free" ones, but they sometimes want to put ads on your site. :( I don't like that, since the site I'm doing is for a non-profit group, and I'm trying to keep it nice and professional looking.

Hope you get a good reply soon!!! (I'll keep my eye on this thread too, and let you know if I find anything).

Francine

francinehds
07-28-2007, 03:50 AM
Just found this by searching through old posts here.... I'm going to try this out and see what happens. I don't mind a little TEXT advertisement, but a big graphic is out of the question for me.

http://www.dynamicdrive.com/forums/showthread.php?t=561&highlight=counter (http://www.dynamicdrive.com/forums/showthread.php?t=561&highlight=counter)(the first response)

Hope that helps. I'll try it out, and let you know if you like :)

Sliight
07-28-2007, 04:14 AM
Hrm I found an odd one... it's a personal hit counter cookie. It tells the user how many times they've visited a page. Not quite what I want, and I'll keep looking...but just in case someone has wanted this... http://www.comptechdoc.org/independent/web/cgi/javamanual/javaihit.html

So far though this is the best one i've seen. No ads, at least not to our webpage. The hit us with ads when we check out stats, but big whoop. I'm going to look some more, but I think this will be the one: http://www.statcounter.com/

alexjewell
07-28-2007, 12:18 PM
I wrote a simple one in PHP. It uses a PHP file and a text file, both in a directory called "counter":



$file = fopen("counter.txt", "r");
$num = fgets($file,4096);
$num += 1;
fclose($file);

$file2 = fopen("counter.txt", "w");
fputs($file2, $num);
fclose($file2);

$visits = "<i>$num</i> visits.<br />";


That would be counter.php.

For counter.txt, just make it and put an html comment in there or something. Make sure it's CHMOD to 777.

Then, to show it on a page:


include('counter/counter.php');

Sliight
07-28-2007, 04:00 PM
I ended up using statcounter.com after a review of what they offer.

I placed a counter (just black text, nothing else) on the bottom right of my home page. 95&#37; of people won't even notice it. All the rest of my pages I placed invisible counters on. The only negative is that they do use cookies, but there are many positives regarding the stats available.

They show me where the person linked to my page from, if any. Location they are at... most popular pages. Lots of stuff the stats pages from my hosting server don't show.

Kinda neat...

alexjewell
07-29-2007, 12:46 AM
I'd use sessions - server-side, so they don't rely on the client side, which is unpredictable.

Sliight
07-29-2007, 01:27 AM
Not sure exactly how I'd...er wait... no clue how I'd do that :)

I personally wanted a counter to be able to see when I start getting traffic. The statcounter one is kinda cool cause it shows the pages any given IP address has accessed. Granted that's intrusive to anyone that notices it, but no normal person would.

alexjewell
07-29-2007, 04:10 AM
Well, sessions would just replace the cookies. Sessions are just like cookies, except they're stored on the server and not on the viewer's computer...which is much more reliable.

However, since you have a pre-made script for the counter, I wouldn't mess with it. Good luck :)