Surfari Internet Counter Instructions
Directions for self-installation on Surfari Internet:
The use of this script by our users is under the assumption you are
some what familiar with the Unix/Linux enviroment and know how to
create a sub-directory off of your user directory and install and
"chmod" script. For the most part, the use if a *good* FTP program
can do this all for you, one like WS_FTP.
If you are not comfortable with doing so, contact help@surfari.net
and we can most likely do something for you. Please check our rates
for services.
ALSO PLEASE NOTE - WHEN YOU FTP (Upload) THIS FILE TO YOUR WEB SITE,
MAKE SURE YOU TRANSFER IT IN "ASCII" FORMAT OR IT WILL NOT SEND THE
TEXT IN THE SCRIPT PROPERLY AND CAUSE IT NOT TO FUNCTION!!
1. Make a directory off of your home directory called /counter
(example) /usr/home/yourname/public_html/counter
2. Copy this script into this directory. First, create a simple
text file called yourname.txt (your username). This file should
contain only "numbers", preferably 0 to start your page off. You
may start it at a different value, but hey, 100 people haven't seen
it on here yet!
3. Edit the script below in *ONLY* the areas it says too, messing with
any of the other parameters will cause it to not function.
4. Now, make the script and the yourname.txt files executable
for "perl". Use chmod 777 counter.cgi and chmod 777 yourname.txt.
(or whatever name you choose for your files).
5. On your homepage (or the html page you choose) put in the command
exactly like the example below where you wish the counter to appear on
your page:
(yourname = Your User Name, i.e. jdoe) - Don't forget to change this in
all the areas needed.
<!--#exec cmd="/usr/home/yourname/public_html/counter/counter.cgi"-->
Replace the "counter.cgi" with any name you may choose.
This is the command hidden in your html document that will execute the
counter whenever your page is loaded or reloaded.
5. See below for brief descriptions on the parts you need to edit to
make the script work for you.
ONLY EDIT THIS PART OF THE SCRIPT!!
Below is the option for you to select how many digits you wish your
counter to have, the maximum is 10 digits, 4 is recommended.
$number_of_digits = 4;
Here, you select what format of graphic file you are going to use for
your counter, you can use ".gif" or ".jpg" images. Note it is *only*
the extension that need be listed.
$end = ".gif";
Below is the location of the graphic image you selected and
also where you will store your own unique "counter" file. This file
is what keeps track of how many hits your page has had.
The options for graphic images are available from the Surfari Userpages
or here counter options screen.
Each selection has a name and a number with it. If you wanted to use
the number 1. graphic set, you would use the following line below. Note that
the only directory names you need to edit are the /1gif and yourname entries.
There are 18 sets to choose from at this time. We do ask that you name your
"counter file" the same as your username on Surfari.Net - (i.e. jdoe.txt)
Graphic directories are setup like this - ( /2gif or /10gif, etc. you get the idea.)
$pathtocounter = "/usr/home/yourname/public_html/counter/yourname.txt";
Here, you need only change the graphic image directory again, same as
stated above, /1gif or /7gif or /11gif etc. all the way thru /18gif.
Just one directory name according to what graphic set you choose.
$pathtoimages = "http://www.surfari.net/1gif/";
Here, you have the option to not use graphic images, this counter will
also work as a "text" counter. Selecting this to "no" will give you a
plain counter, no images needed or involved.
$graphics = "yes";
DO NOT EDIT BELOW THIS LINE!! OR IT WILL NOT WORK!
Where you see this line - please trust it!! Stop There!!!
ALSO NOTE - This is only the directions and the TOP part of the actual
CGI Script. It is here for reference only - You MUST use the entire script
in order for it to work!!
############################################################################
Back to the HTML Tutorial Index