473,395 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Counter

I've been looking for a counting script to count the number of hits to my
HTM and asp web pages on my company's internal website. So far, everything
I've seen only works on asp pages. Where would I find some counter code to
record hits on htm(l) as well as asp pages?

I'm using IIS 5.0.

Thanks.
Jul 19 '05 #1
8 2494
Jim in Arizona wrote on 15 okt 2004 in
microsoft.public.inetserver.asp.general:
I've been looking for a counting script to count the number of hits to
my HTM and asp web pages on my company's internal website. So far,
everything I've seen only works on asp pages. Where would I find some
counter code to record hits on htm(l) as well as asp pages?

I'm using IIS 5.0.

This NG is an ASP forum, so I will try an asp answer.

In IIS you can set .htm and .html extension files to act like .asp files
and be processed by the asp engine.

btw, why don't you simply change the extension of your .htm file to .asp ?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 19 '05 #2
Have you looked into using the IIS logs and stats software for this?

http://www.aspfaq.com/show.asp?id=2473

Ray at work

"Jim in Arizona" <ti*******@hotmail.com> wrote in message
news:ee*************@TK2MSFTNGP09.phx.gbl...
I've been looking for a counting script to count the number of hits to my
HTM and asp web pages on my company's internal website. So far, everything
I've seen only works on asp pages. Where would I find some counter code to
record hits on htm(l) as well as asp pages?

I'm using IIS 5.0.

Thanks.

Jul 19 '05 #3
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
Jim in Arizona wrote on 15 okt 2004 in
microsoft.public.inetserver.asp.general:
I've been looking for a counting script to count the number of hits to
my HTM and asp web pages on my company's internal website. So far,
everything I've seen only works on asp pages. Where would I find some
counter code to record hits on htm(l) as well as asp pages?

I'm using IIS 5.0.

This NG is an ASP forum, so I will try an asp answer.

In IIS you can set .htm and .html extension files to act like .asp files
and be processed by the asp engine.

btw, why don't you simply change the extension of your .htm file to .asp ?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)


I will probably change all the extensions, eventually, but the site is too
large to take the time to do that right now. I've got over 5000 htm files on
the site and they're all linked to other htm files. It's going to requre
some considerable resources to make the change.

Thanks for the info.
Jul 19 '05 #4

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:er**************@TK2MSFTNGP12.phx.gbl...
Have you looked into using the IIS logs and stats software for this?

http://www.aspfaq.com/show.asp?id=2473

Ray at work

"Jim in Arizona" <ti*******@hotmail.com> wrote in message
news:ee*************@TK2MSFTNGP09.phx.gbl...
I've been looking for a counting script to count the number of hits to my
HTM and asp web pages on my company's internal website. So far,
everything I've seen only works on asp pages. Where would I find some
counter code to record hits on htm(l) as well as asp pages?

I'm using IIS 5.0.

Thanks.



Thanks Ray. I will look into that!
Jul 19 '05 #5
Jim in Arizona wrote:
btw, why don't you simply change the extension of your .htm file to
.asp ?


I will probably change all the extensions, eventually, but the site
is too large to take the time to do that right now. I've got over
5000 htm files on the site and they're all linked to other htm files.
It's going to requre some considerable resources to make the change.


But clearly you will need to touch all of them to add your counter, right?
Assuming you parse htm/html docs with asp.dll, you could condense the
solution to a single #include insertion.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #6
Another thing that could make this easier is FrontPage. When you rename
a file using FrontPage & the FrontPage server extensions (I'm not sure
how it works in 2003 since they dumped the server extensions) all HTML
links point to the new file name. Of course that is just a thought.

Jim in Arizona wrote:


I will probably change all the extensions, eventually, but the site is too
large to take the time to do that right now. I've got over 5000 htm files on
the site and they're all linked to other htm files. It's going to requre
some considerable resources to make the change.

Thanks for the info.


--
Please do not contact me directly or ask me to contact you directly for
assistance.

If your question is worth asking, it's worth posting.

If it’s not worth posting you should have done a search on
http://www.google.com/ http://www.google.com/grphp?hl=en&tab=wg&q= or
http://news.google.com/froogle?hl=en&tab=nf&ned=us&q= before wasting our
time.
Jul 19 '05 #7
Include this in the body of all your HTML pages where you want the counter
to appear:

<SCRIPT SRC="counter.asp" LANGUAGE="javascript"></SCRIPT>

When processed, counter.asp *must* return a javascript formatted file to the
calling HTML page. You can do your counter housework in ASP, and then use
javascript to write the output.
---- COUNTER.ASP
<%
Response.Expires = 0
' do counter stuff here, and store it in strPageCount
%>
// this is the javascript
document.write('<%=strPageCount%> visits to this page');
end ----------------------
-Bill.

"Jim in Arizona" <ti*******@hotmail.com> wrote in message
news:ee*************@TK2MSFTNGP09.phx.gbl...
I've been looking for a counting script to count the number of hits to my
HTM and asp web pages on my company's internal website. So far, everything
I've seen only works on asp pages. Where would I find some counter code to
record hits on htm(l) as well as asp pages?

I'm using IIS 5.0.

Thanks.

Jul 19 '05 #8
> I will probably change all the extensions, eventually, but the site is too
large to take the time to do that right now. I've got over 5000 htm files on
the site and they're all linked to other htm files. It's going to requre
some considerable resources to make the change.


Just use a text editor with "search/replace in files" capability, such
as UltraEdit, to do a find for .htm and replace with .asp
Jul 21 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Shane | last post by:
:) I am following a tutorial for php (hudzilla.org) absolutely loving it however I am having trouble with the counter example <?php // your content here... $filename = 'counter.txt'; // our...
16
by: Paul Rubin | last post by:
I'd like to have a function (or other callable object) that returns 0, 1, 2, etc. on repeated calls. That is: print f() # prints 0 print f() # prints 1 print f() # prints 2 # etc. ...
7
by: JellyON | last post by:
Hi. Is there a way to delay a call to a page counter (ie. call to a server script from an IMG tag) for the purpose to not lock the page loading awaiting counter be displayed. Maybe a...
0
by: Earl Anderson | last post by:
KB Article Q140908 provided the following function to create an Auto Incrementing Counter: Function Next_Custom_Counter () On Error GoTo Next_Custom_Counter_Err Dim MyDB As Database Dim...
7
by: mistral | last post by:
I use htaccess to protect directory and granting access to download file only for the authorized users. Just want implement simple PHP file download counter for single file. I need track the number...
0
by: Trevor L. | last post by:
I decide to put a custom Hit Counter on my page (below). Then I won't be reliant on the standard FrontPage one which uses webbots. It is called by <b>Hit Counter: </b><!--#include...
12
by: devospice | last post by:
Hi, I'm trying to create a download counter for individual files on a web site and I'm not sure how to do this. Right now I'm using Webalizer to just read the log files and see how many times...
5
by: jasonchan | last post by:
How would you set up a counter in javascript that goes from 5 to 0 This is what i have so far and it is not displaying in the div container "counter" for some reason... <!DOCTYPE html PUBLIC...
3
blackstormdragon
by: blackstormdragon | last post by:
Here were our instructions: "My mother always took a little red counter to the grocery store. The counter was used to keep tally of the amount of money she would have spent so far on that visit to...
2
by: gumbercules | last post by:
I am designing a site that is regulary updated with new podcasts. I would like to be able to have a counter next to each podcast showing how many hits/listens/plays/views each particular podcast has...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.