Anti-Spam Page Counter - Setup Guide


Anit-Spam Guestbook Script
Version 1.2
COPYRIGHT @ 2005 by Aubrey Millard

How to set up the Script      Variables

This script was created with the novice user in mind. If you use most of the defaults then you can configure this script in just a few minutes.

BEFORE you start to try to set up this script make sure you know the following things.
1. The location of PERL on your server ie. /usr/bin/perl or C:/perl/bin/perl.exe
2. the PATH to your website ie. /www/usr/myprofile/
3. The PATH to where you will want to store the counter files ie. /www/cgi-bin/mylogs/

OK, if you know or have handy the above information let's jump in.
I assume that you have the script downloaded and unzipped on your computer somewhere.
(If not go to the Downloads section and get it now)
In Notepad open up the file called asgb.pl. This is the script file that does all the work. BE VERY CAREFUL when editing this file!!!! If you accidently delete something as simple as a "; " it could cause the script to fail.

Anit-Spam Counter Script
Version 1.0
COPYRIGHT @ 2005 by Aubrey Millard

How to set up the Counter script.

If you have setup your Guestbook then this will be a breeze.
The only things that you have to setup are the variables 
and the HTML links.

Here are the variables that need to be set:


 Number of digits to display. It will padd with 0's
 like 00376. Set to 0 for no padding ie. 376
 $NumDigits = 5;

Extension for graphic images ie ".jpg"  ".gif" etc.
Remember there is a difference between .JPG and .jpg
$Ext = ".gif";

 Set this to specify to use command line
 aguments to specify counter.
 ie. ascount.cgi?mycount.txt
$USECOMMAND="NO";

 Path and filename for text file that holds count.
ie /cgi-bin/counter/counts.txt
$CountFile = "count.txt";

 Path to images in a  URL. Dont add the filenames at the end.
Just the path to the folder.
 Number images need to be named 1.jpg 2.jpg etc.
$ImagePath = "http://www.somedomain.com/images/";

 Set YES to use images. Set NO to just use text.
$UseImages = "NO";

 This is the text that is printed before the number.
 You could use "Visitor Number:" or whatever.
 If you dont want anything just set it to ""
$CounterText="<STRONG><FONT size=\"2\">Visitor Number:</FONT></STRONG> ";

Now on the webpage where you want to have the counter show up put this:

<!--#include virtual="/cgi-bin/ascount.cgi"-->

If you have specifdied $USECOMMAND then the link would be like this:
<!--#include virtual="/cgi-bin/ascount.cgi?mycount.txt"-->
just change mycount.txt to whatever text file you create.

Just change it to point to your counter script.
You CAN'T use a URL like http://www.mydomain/cgi-bin/counter.cgi it HAS to be a relative path like /cgi-bin/counter.cgi
Back to Help   ||