473,657 Members | 2,453 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2530
Jim in Arizona wrote on 15 okt 2004 in
microsoft.publi c.inetserver.as p.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*******@hotm ail.com> wrote in message
news:ee******** *****@TK2MSFTNG P09.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******** ************@19 4.109.133.29...
Jim in Arizona wrote on 15 okt 2004 in
microsoft.publi c.inetserver.as p.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******** ******@TK2MSFTN GP12.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*******@hotm ail.com> wrote in message
news:ee******** *****@TK2MSFTNG P09.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.as p" LANGUAGE="javas cript"></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.Expire s = 0
' do counter stuff here, and store it in strPageCount
%>
// this is the javascript
document.write( '<%=strPageCoun t%> visits to this page');
end ----------------------
-Bill.

"Jim in Arizona" <ti*******@hotm ail.com> wrote in message
news:ee******** *****@TK2MSFTNG P09.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
553
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 counter file $fp = fopen( $filename,"r"); // open it for READING ("r") $counter = fread($fp, filesize($filename) ); // read in value
16
10642
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. There should never be any possibility of any number getting returned twice, or getting skipped over, even if f is being called from
7
3430
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 setTimeout() launching an equivalent of "document.write", but writing in a specific DIV ? Thanks in advance for your ideas. Actually, the counter is called (without delay) like this : <div id="count" style="position: absolute; visibility: visible; top:
0
5862
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 MyTable As Recordset Dim NextCounter As Long
7
3427
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 of downloads of this file on my website, IP address and date. Since I have no access to Apache log files, I need some other way, use script that will write a log file. Is there some handy way? M.
0
1988
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 file="_fpclass/hit_count.inc"--> The code it includes is below. OK, it works - sort of. If I go to Guestbook and then return via the Home button, the counter
12
2898
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 the files I'm interested in were downloaded. The problem is Webalizer breaks it up by month and I want a running total. I'd also like to see the counts without having to log in to Webalizer in the first place. Not that logging in or adding the...
5
2087
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 "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled...
3
10124
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 the store if she bought everything in the basket. The counter had a four-digit display, increment buttons for each digit, and a reset button. An overflow indicator came up red if more money was entered than the $99.99 it would register. (This was a...
2
2852
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 gotten. eg: podcast001.mp3 plays: 12 I have set up a column in a mysql database for each podcast called 'counter'. I then tried to make a php-javascript hybrid code with functions on onClick that went into and added one to the counter...
0
8420
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8324
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8740
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8617
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.