Member Avatar for bikertz

I am using php code obtained from www.phpjunkyard.com to keep track of the hits to the individual pages of my web site. The hit counter is accessed by placing this bit of code in each web page:

<script LANGUAGE="Javascript" SRC="http://www.WEBSITE_URL/counter.php?page=PAGENAME"></script>

where counter.php is the hit counter code file, page=PAGENAME is a value passed to counter.php and is the name of the txt file which will hold the count for that specific page. I am using a Microsoft Web Expression 3 template for all the pages in my site. I would like to be able to put the above script in my template along with script code to replace PAGENAME with the html filename (without extension) of each page. Is this possible? If so, how would I do that?

As an example, for index.html I would like the SRC to read "http://www.WEBSITE_URL/counter.php?page=index"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.