Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 03:33 PM
Jim in Arizona
Guest
 
Posts: n/a
Default 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.


  #2  
Old July 19th, 2005, 03:33 PM
Evertjan.
Guest
 
Posts: n/a
Default Re: Counter

Jim in Arizona wrote on 15 okt 2004 in
microsoft.public.inetserver.asp.general:
[color=blue]
> 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.[/color]


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)

  #3  
Old July 19th, 2005, 03:33 PM
Ray Costanzo [MVP]
Guest
 
Posts: n/a
Default Re: Counter

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" <tiltowait@hotmail.com> wrote in message
news:eeaRlCvsEHA.624@TK2MSFTNGP09.phx.gbl...[color=blue]
> 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.
>[/color]


  #4  
Old July 19th, 2005, 03:33 PM
Jim in Arizona
Guest
 
Posts: n/a
Default Re: Counter

"Evertjan." <exjxw.hannivoort@interxnl.net> wrote in message
news:Xns9583E119E8362eejj99@194.109.133.29...[color=blue]
> Jim in Arizona wrote on 15 okt 2004 in
> microsoft.public.inetserver.asp.general:
>[color=green]
>> 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.[/color]
>
>
> 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)
>[/color]

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.


  #5  
Old July 19th, 2005, 03:34 PM
Jim in Arizona
Guest
 
Posts: n/a
Default Re: Counter


"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:ermxNKvsEHA.2316@TK2MSFTNGP12.phx.gbl...[color=blue]
> 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" <tiltowait@hotmail.com> wrote in message
> news:eeaRlCvsEHA.624@TK2MSFTNGP09.phx.gbl...[color=green]
>> 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.
>>[/color]
>
>[/color]

Thanks Ray. I will look into that!


  #6  
Old July 19th, 2005, 03:34 PM
Dave Anderson
Guest
 
Posts: n/a
Default Re: Counter

Jim in Arizona wrote:[color=blue][color=green]
>> btw, why don't you simply change the extension of your .htm file to
>> .asp ?[/color]
>
> 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.[/color]

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.


  #7  
Old July 19th, 2005, 03:34 PM
Joker
Guest
 
Posts: n/a
Default Re: Counter

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:
[color=blue]
>
>
> 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.
>
>[/color]

--
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.
  #8  
Old July 19th, 2005, 03:34 PM
Bill
Guest
 
Posts: n/a
Default Re: Counter

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" <tiltowait@hotmail.com> wrote in message
news:eeaRlCvsEHA.624@TK2MSFTNGP09.phx.gbl...[color=blue]
> 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.
>
>[/color]


  #9  
Old July 21st, 2005, 08:39 AM
Larry Bud
Guest
 
Posts: n/a
Default Re: Counter

> I will probably change all the extensions, eventually, but the site is too[color=blue]
> 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.[/color]

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

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles