Visitation Counter.

Discussion in 'HTML' started by DLU, Jan 14, 2009.

  1. DLU

    DLU Guest

    How or where do I get a way to count viewers tp the web site?
    --
    ***************************************
    * This is the Spammish Inquisition *
    * Not Lumber Cartel Unit 75 [TINLC] *
    * I am not SPEWS.ORG *
    ***************************************
    DLU, Jan 14, 2009
    #1
    1. Advertising

  2. DLU

    Nicole Guest

    DLU wrote:

    > How or where do I get a way to count viewers tp the web site?



    Try the code below.
    It requires the right to run own perl-scripts.


    Nicole



    #!/usr/bin/perl -w
    ###################################################################
    ## Count It! Version 1.0 - 05/29/98 ##
    ## ------------------------------------------------------------- ##
    ## Copyright (C) 1998 Dimension's CGI Workshop ##
    ## http://www.thenetnow.com/dimension ##
    ## dimension[- here was an add - ]cybered.net ##

    # Path and name of data file (suggested that you leave this as is)
    $datafile = "counts.dat";
    #############################################

    # $pagepath = $ENV{'DOCUMENT_URI'};
    # $pagepath = "."; # bei Problemen wieder 1. Zeile
    $pagepath = "/index.shtml";

    print "Content-type: text/html\n\n";

    # Ensure that the document exists; creates a new one if it does not
    open(FILE, ">>$datafile");
    close(FILE);

    open(FILE, "$datafile");
    @indata = <FILE>;
    close(FILE);

    # Folgende Zeile ist von Rudi 7-1-2003
    # Bewirkt, dass leeres array abgefangen wird.
    if (scalar(@indata) < 1) {exit;}

    $onoff = 0;
    open(FILE, ">$datafile");
    foreach $temp (@indata)
    {
    chop($temp);
    ($uri, $count) = split(/\|/, $temp);
    if ($uri eq $pagepath) {
    $count++;
    $onoff = 1;
    print FILE "$uri|$count\n";
    print "$count"; }
    else { print FILE "$uri|$count\n"; }
    }
    if ($onoff eq 0) {
    print FILE "$pagepath|1\n";
    print "1"; }

    close(FILE);
    Nicole, Jan 15, 2009
    #2
    1. Advertising

  3. DLU

    DLU Guest

    Brian Cryer wrote:
    > "DLU" <> wrote in message
    > news:b43db$496e1522$439f9013$...
    >> How or where do I get a way to count viewers to the web site?

    >
    > If you have access to your server logs then that is probably one of the
    > best ways to go - especially if your host provides access to something
    > like awstats.
    >
    > Otherwise, if you are after a simple counter then quite a number are
    > listed here: http://www.cryer.co.uk/resources/websitecounters.htm
    > Or if you are after site stats then
    > http://www.cryer.co.uk/resources/websitetracking.htm
    >
    > Hope this helps.


    The site is on the Sierra Club server so it looks like I will have to
    see what the webmaster has. I was hoping for some sort of HTML, or JAVA
    code to do the trick.
    All I really want to do is see if anyone is actually visiting the site.

    --
    ***************************************
    * This is the Spammish Inquisition *
    * Not Lumber Cartel Unit 75 [TINLC] *
    * I am not SPEWS.ORG *
    ***************************************
    DLU, Jan 17, 2009
    #3
  4. DLU

    David Segall Guest

    DLU <> wrote:

    >Brian Cryer wrote:
    >> "DLU" <> wrote in message
    >> news:b43db$496e1522$439f9013$...
    >>> How or where do I get a way to count viewers to the web site?

    >>
    >> If you have access to your server logs then that is probably one of the
    >> best ways to go - especially if your host provides access to something
    >> like awstats.
    >>
    >> Otherwise, if you are after a simple counter then quite a number are
    >> listed here: http://www.cryer.co.uk/resources/websitecounters.htm
    >> Or if you are after site stats then
    >> http://www.cryer.co.uk/resources/websitetracking.htm
    >>
    >> Hope this helps.

    >
    >The site is on the Sierra Club server so it looks like I will have to
    >see what the webmaster has. I was hoping for some sort of HTML, or JAVA
    >code to do the trick.
    >All I really want to do is see if anyone is actually visiting the site.

    In that case you can let someone else do the counting. For example,
    StatCounter <http://www.statcounter.com/> or Google Analytics
    <http://www.google.com/analytics/> will do it for you. Neither are
    entirely accurate but they will certainly tell you if you have more
    than a few visitors and which page(s) they look at.
    David Segall, Jan 17, 2009
    #4
  5. DLU

    DLU Guest

    David Segall wrote:
    > DLU <> wrote:
    >


    >> All I really want to do is see if anyone is actually visiting the site.

    > In that case you can let someone else do the counting. For example,
    > StatCounter <http://www.statcounter.com/> or Google Analytics
    > <http://www.google.com/analytics/> will do it for you. Neither are
    > entirely accurate but they will certainly tell you if you have more
    > than a few visitors and which page(s) they look at.


    I just installed it and it works fine. i was worried that in order o
    access the site there is a password page to go through, but I checked it
    after uploading the code and it works.

    Thanks, at least I will know if anyone actually looks at it.

    http://clubhouse.sierraclub.org/ca/cnrcc/index.asp
    --
    ***************************************
    * This is the Spammish Inquisition *
    * Not Lumber Cartel Unit 75 [TINLC] *
    * I am not SPEWS.ORG *
    ***************************************
    DLU, Jan 18, 2009
    #5
  6. DLU

    Adrian Guest

    "DLU" <> wrote in message
    news:29dd9$4972b1dd$439f9013$...
    > David Segall wrote:
    >> DLU <> wrote:
    >>

    >
    >>> All I really want to do is see if anyone is actually visiting the site.

    >> In that case you can let someone else do the counting. For example,
    >> StatCounter <http://www.statcounter.com/> or Google Analytics
    >> <http://www.google.com/analytics/> will do it for you. Neither are
    >> entirely accurate but they will certainly tell you if you have more
    >> than a few visitors and which page(s) they look at.

    >
    > I just installed it and it works fine. i was worried that in order o
    > access the site there is a password page to go through, but I checked it
    > after uploading the code and it works.
    >
    > Thanks, at least I will know if anyone actually looks at it.
    >
    > http://clubhouse.sierraclub.org/ca/cnrcc/index.asp
    > --
    > ***************************************
    > * This is the Spammish Inquisition *
    > * Not Lumber Cartel Unit 75 [TINLC] *
    > * I am not SPEWS.ORG *
    > ***************************************

    I had a look at your attractive website. It took me quite a
    while to discover what the club is about, why not have that
    (objectives, etc) more prominently displayed?
    Regards,
    Adrian.
    Adrian, Jan 18, 2009
    #6
  7. DLU

    rf Guest

    DLU wrote:
    > David Segall wrote:
    >> DLU <> wrote:
    >>

    >
    >>> All I really want to do is see if anyone is actually visiting the
    >>> site.

    >> In that case you can let someone else do the counting. For example,
    >> StatCounter <http://www.statcounter.com/> or Google Analytics
    >> <http://www.google.com/analytics/> will do it for you. Neither are
    >> entirely accurate but they will certainly tell you if you have more
    >> than a few visitors and which page(s) they look at.

    >
    > I just installed it and it works fine. i was worried that in order o
    > access the site there is a password page to go through, but I checked
    > it after uploading the code and it works.
    >
    > Thanks, at least I will know if anyone actually looks at it.
    >
    > http://clubhouse.sierraclub.org/ca/cnrcc/index.asp


    <quote>
    Mostly, we have a login screen to keep search engines out.
    </quote>

    What's wrong with a robots.txt file?
    rf, Jan 18, 2009
    #7
  8. DLU

    DLU Guest

    Adrian wrote:
    > "DLU" <> wrote in message
    > news:29dd9$4972b1dd$439f9013$...
    >> David Segall wrote:
    >>> DLU <> wrote:
    >>>
    >>>> All I really want to do is see if anyone is actually visiting the site.
    >>> In that case you can let someone else do the counting. For example,
    >>> StatCounter <http://www.statcounter.com/> or Google Analytics
    >>> <http://www.google.com/analytics/> will do it for you. Neither are
    >>> entirely accurate but they will certainly tell you if you have more
    >>> than a few visitors and which page(s) they look at.

    >> I just installed it and it works fine. i was worried that in order o
    >> access the site there is a password page to go through, but I checked it
    >> after uploading the code and it works.
    >>
    >> Thanks, at least I will know if anyone actually looks at it.
    >>
    >> http://clubhouse.sierraclub.org/ca/cnrcc/index.asp
    >> --
    >> ***************************************
    >> * This is the Spammish Inquisition *
    >> * Not Lumber Cartel Unit 75 [TINLC] *
    >> * I am not SPEWS.ORG *
    >> ***************************************

    > I had a look at your attractive website. It took me quite a
    > while to discover what the club is about, why not have that
    > (objectives, etc) more prominently displayed?
    > Regards,
    > Adrian.
    >
    >

    I guess I could put something at the top that says something about going
    to the Sierraclub.org home page. The password is not real secret, the
    clues are in the upper left on the Clubhouse page.

    Thanks for the complement on the page. I had a lot of help from people
    on this newsgroup. Thanks to, Els, Neredbojias, Bergamot, Little,
    dorayme, and others. The CNRCC page is primarily for members of the
    committee. If anyone is going to be in Shoshone the weekend of February
    7-8 there will be a meeting of the Desert Committee and wilderness
    committee. there will be representatives from the BLM and most likely
    Death Valley NP. The superintendent of Death Vally usually attends but
    he just retired. The town is owned by Susan Brown who lets us use a
    community building there.











    --
    ***************************************
    * This is the Spammish Inquisition *
    * Not Lumber Cartel Unit 75 [TINLC] *
    * I am not SPEWS.ORG *
    ***************************************
    DLU, Jan 18, 2009
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. The Eeediot
    Replies:
    3
    Views:
    2,206
    =?Utf-8?B?UnVsaW4gSG9uZw==?=
    Dec 22, 2004
  2. RAB

    page visitation counter...

    RAB, Mar 22, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    372
    Alvin Bruney - ASP.NET MVP
    Mar 22, 2006
  3. morten
    Replies:
    1
    Views:
    552
    Thomas J. Gritzan
    May 10, 2007
  4. George2
    Replies:
    1
    Views:
    778
    Alf P. Steinbach
    Jan 31, 2008
  5. Tim Greer

    Re: Visitation Counter.

    Tim Greer, Jan 14, 2009, in forum: HTML
    Replies:
    0
    Views:
    347
    Tim Greer
    Jan 14, 2009
Loading...

Share This Page