Results 1 to 7 of 7

Thread: Hit Counter

  1. #1
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Hit Counter

    I have just created a small website for my childrens school. Nothing special, about 14 pages of XHTML compliant pages. I have to host it on the Education network and so cannot do anything too fancy.

    The headteacher has asked me if we can get a count of hits. I search through the internet and all I can find is a group of companies who will do the counts, this is not what I want.

    I would rather have a folder in the back end of my account folder that can just do a basic number of hits, that's all. I thought maybe in a database. I am not great on this aspect so if someone could point me in the right direction or talk me through it I would be grateful..... Oh yes, it is a school so they won't pay for software or a hosting solution!!!

    I just found this javascript is this worth it:
    Jerry

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Hit Counter

    I think I have just answered this question by adding this attachment. I put javascript in the text document and it is now acting like a hit counter <img src=/S/cool.gif border=0 alt=cool width=15 height=15>.

    When testing at home though pop up blocker stopped it. Is there another solution?
    Jerry

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Hit Counter

    If you want a count of all visitors, I don't think a cookie is going to work. If you are allowed to use a little CGI, there are Perl and other scripts out there for simple hit (page-load) counting that I suspect are free for all, and certainly free for academic use. If you can't run script on the server, you could download (FTP) the web server logs to a local machine and use a program to extract more information than you ever wanted about your visitors. For Apache-format logs, a lot of those programs are free (open source).

  4. #4
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Hit Counter

    Thanks Jeff

    ooh err CGI, Perl alien world <img src=/S/hiding.gif border=0 alt=hiding width=70 height=24> to me. So could you hold my hand through this one please. I know that a lot of UK local government inclusive of the Local Education Authorities are against CGI/perl and prefer asp as their page design. I was hoping for a quick dirty, but safe fix. If this is not possible I would prefer not to have it. Your thoughts/advice.
    Jerry

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Hit Counter

    If you are allowed to use ASP, there probably are ASP scripts for this, too. The first five hits in Google for hit counter asp are:

    ASP 101 - ASP Hit Counter Source Code (well commented, counts every retrieval, individual files)
    An ASP Hit Counter (counts only one retrieval per ASP "session")
    ASP Hit Counter Tutorial (more info, but any clearer?)
    PowerASP.com Simple ASP Based Hit Counter System (must download before reading code)
    CodeAve.com/ASP - ASP Hit Counter (they all start to blur together...)

    Now, these scripts presume that your entire site is written in ASP. But I suspect that isn't true. There is a "back door" way to import into a JavaScript variable the output of an ASP script (in this case, the output would be the "new" hit count for the page). For an example, see <post#=129,006>post 129,006</post: >. I think that with a little JavaScript and an extremely fancy ASP page, you could have a single script maintain a database of hits for all pages on your site. (That assumes the HTTP_REFERER for the ASP page called with a JavaScript include is the page the user is loading... I'm not 100% sure of that.)

    So now I've probably left you worse off than where you started, but if you find out that you can use ASP, then perhaps one of the ASP wizards can knit this all together for you.

  6. #6
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Hit Counter

    Thanks Jeff

    Sorry for the delay in getting back to you, I have been in exams all morning <img src=/S/sad.gif border=0 alt=sad width=15 height=15>
    Jerry

  7. #7
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Hit Counter

    <img src=/S/whisper.gif border=0 alt=whisper width=29 height=17> School exams, I hope, not medical exams. <img src=/S/wink.gif border=0 alt=wink width=15 height=15>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •