Page 1 of 1

I Need a Simple Hit Counter

Posted: Sun Feb 01, 2009 10:02 pm
by Spidey
I need a nice simple reliable page/site hit counter, the kind that simply goes into a CGI-BIN folder, and is displayed with a simple HTML image tag, or such.

It would be nice if the size, color & font could be set could be set with the HTML tag.

Requirements…

1. Its needs to only increment the count only when the site is visited from absolute urls, not from relative ones. (can’t be incremented by returning from same site pages)

2. No need for cookies, no need for unique visits, etc.

3. Should be coded in a common script, like ASP, or PHP, etc.

What I need…

1. The Script itself.
2. Sample HTML tag.
3. Some basic instructions, such as resetting or starting at a specific count, etc.
4. The trigger code, and any codes for viewing the counter without incrementing it.

Free would be nice, but paying a small price is not a deal breaker.

Thanks in advance

Posted: Mon Feb 02, 2009 2:06 am
by Jeff250
Are you familiar with programming in general? This is really a perfect introductory php project. The simplest incarnation would read the count from a flat text file, and then check the visitor's referrer to see where she came from. (Referrer isn't trustworthy, but it's good enough.) If her referring url is from outside your site, then increment the counter and write the new count to the flat text file. Lastly, if desirable, display the count; otherwise, you're done.

Posted: Mon Feb 02, 2009 8:35 am
by Spidey
Thanks, but I’m looking for a pre made counter, like the one my old host supplied.

Posted: Tue Feb 03, 2009 7:09 am
by fliptw
where is this being hosted?

Posted: Tue Feb 03, 2009 7:57 am
by AlphaDoG

Posted: Tue Feb 03, 2009 8:25 am
by Spidey
The site is hosted by a company called PAETEC (I think, will look it up, if it matters) why?

AlphaDog. I don’t want my counter hosted off site. And I have already searched my azz off, just figured maybe someone here could make a suggestion.

Posted: Tue Feb 03, 2009 6:30 pm
by Spidey
Ok, so the requirement to not increment the counter when returning to the home page, is now not needed, because I have a good workaround, by using a meta refresh page, as Index.html then moving on to a page that won’t have the counter on it. (pretending to be the home page)

So I figure most recounts can be avoided, by using the navigation buttons, and the few that hit by using the back button, I’m not going to worry about.

Most browsers do support meta refresh correct?

Posted: Tue Feb 03, 2009 8:21 pm
by AlphaDoG
You could call a javascript that resides on your page to do the work you need. Was my point.