Counter

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jim in Arizona

    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.


  • Evertjan.

    #2
    Re: Counter

    Jim in Arizona wrote on 15 okt 2004 in
    microsoft.publi c.inetserver.as p.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)

    Comment

    • Ray Costanzo [MVP]

      #3
      Re: Counter

      Have you looked into using the IIS logs and stats software for this?



      Ray at work

      "Jim in Arizona" <tiltowait@hotm ail.com> wrote in message
      news:eeaRlCvsEH A.624@TK2MSFTNG P09.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]


      Comment

      • Jim in Arizona

        #4
        Re: Counter

        "Evertjan." <exjxw.hannivoo rt@interxnl.net > wrote in message
        news:Xns9583E11 9E8362eejj99@19 4.109.133.29...[color=blue]
        > Jim in Arizona wrote on 15 okt 2004 in
        > microsoft.publi c.inetserver.as p.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.


        Comment

        • Jim in Arizona

          #5
          Re: Counter


          "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
          message news:ermxNKvsEH A.2316@TK2MSFTN GP12.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@hotm ail.com> wrote in message
          > news:eeaRlCvsEH A.624@TK2MSFTNG P09.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!


          Comment

          • Dave Anderson

            #6
            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.


            Comment

            • Joker

              #7
              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.

              Comment

              • Bill

                #8
                Re: Counter

                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" <tiltowait@hotm ail.com> wrote in message
                news:eeaRlCvsEH A.624@TK2MSFTNG P09.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]


                Comment

                • Larry Bud

                  #9
                  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

                  Comment

                  Working...