# Stand alone WebPageCounter ?



## Cushion (Jan 16, 2008)

Hi there !
I have spent the last two days trying to find htlm code for a webpage counter that lives and collects the info. on my web site. All the ones i find divert the data somewhere else. Any Ideas? thanks


----------



## Sequal7 (Apr 15, 2001)

I know of several, and have created a couple.
What programming language are you looking to get one in and what would you like it to do?

Just count and display hits, or give stats on browser types, times, pages viewed etc??


----------



## Cushion (Jan 16, 2008)

Well i am not sure which language is best but it just needs to count and display hits on a few pages ,just plain htlm !!!


----------



## cristobal03 (Aug 5, 2005)

If I understand what you're suggesting, it can't be done. You can't make a page counter strictly using HTML. Maybe you could approximate something with javascript, but I don't know how you'd achieve data persistence. You need to store the information on the hosting server or its proxy; HTML and javascript, by contrast, are client-side technologies.

In other words, this has to be done with PHP, Perl, ASP, CGI of some kind, or some other server-side technology. It will likely (but not necessarily) include a database.

chris.


----------



## Cushion (Jan 16, 2008)

Ok thanks for the info. I did have a counter that used a CGI script at the end of a html page, but lost it when i changed sites. It kept track of the hits right on my web space where the page index lives and displayed the hits on my opening page . I am not that familiar with code so i was hoping to find the lines on the web. george


----------



## Sequal7 (Apr 15, 2001)

Perhap this one would work for you?
http://www.braemoor.co.uk/software/hitcounter.shtml

Once the script is inserted into your cgi directory, all you need is this to include it on your page.

```
<!--#include virtual="/cgi-bin/hitcounter.cgi?counter=countername&display=true"--> 
<script type="text/javascript">document.cookie = "countername=0";</script>
```


----------

