Visitation Counter.

D

DLU

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 *
***************************************
 
N

Nicole

DLU said:
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);
 
D

DLU

Brian said:
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 *
***************************************
 
D

David Segall

DLU said:
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.
 
D

DLU

David said:
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 *
***************************************
 
A

Adrian

DLU said:
David said:
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.
 
R

rf

DLU said:
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?
 
D

DLU

Adrian said:
DLU said:
David said:
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 *
***************************************
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

asp.net 29
IE7. 3
Thumbnail gif Question. 39
.NET Question. 28
Password protection question. 27
IE, Firefox conflict. 105
How to orient mouseover display. 1
Creating email input to hidden address. 21

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,197
Latest member
ScottChare

Latest Threads

Top