Documentation
CLICKBLASTER:  V3.0


System Requirements

Preliminaries

  • Determine the path to PERL 5 on your web server host.  Note that some web hosting companies run both PERL 4 and PERL 5.  Make ABSOLUTELY sure you are not setting this up under PERL 4.  Ask your administrator if you are not sure.
  • Unpack the tar archive on your desktop using a program that unpacks UNIX TAR ARCHIVES. If you don't have such a program then download WINZIP FREE from SHAREWARE.COM
  • After you have unpacked the TAR archive you will have a collection of folders and files on your desktop.  Now you have to do some basic editing of each of these files (or at least some of them).  Use a text editor such as wordpad, notepad, BBEdit, simpletext, or teachtext to edit the files.  These are NOT WORD PROCESSOR DOCUMENTS they are just simple TEXT files so don't save them as word processor documents or save them with extentions such as .txt or they will NOT WORK.   Note that there may be a some files inside of folders which are "blank".   This is normal.

Preparing the CGI scripts

Define Path To PERL 5

The first step is to open up each and every file that has a .cgi extention and edit line number one of each script.  Each of the cgi scripts is written in perl 5. For your scripts to run they must know where perl 5 is installed on your web server. The path to perl 5 is defined to a cgi script in the first line of the file. In each of the cgi scripts the first line of code looks something like this:

#!/usr/bin/perl

If the path to perl 5 on your web server is different from /usr/bin/perl you must edit the first line of each cgi script to reflect the correct path. If the path to perl 5 is the same no changes are necessary. If you do not know the path to perl 5 ask the webmaster or system administrator at your server site.  

Create database and upload the .sql file

Upload the .sql file into your mysql database (review mysql tutorial) if you do not know how, or better yet - bug your isp and get them to do it.

Configure the .cgi files

configure.cgi

This file pretty much runs the whole show.  If you screw this one up don't count on anything working properly.   In other words, make sure you take the time to do this step CORRECTLY.  Ask your administrator if you need to.  Below are the variables used in ALL of the other cgi scripts.  All of the other cgi programs USE configure.cgi to figure out where certain things are.  You will use TWO COPIES of configure.cgi to run this system.  They are the EXACT SAME FILE - just TWO COPIES (/cgi-bin/clickblaster/configure.cgi and /cgi-bin/clickblaster/admin/configure.cgi)

  • $admin = "you\@yourdomain.com";
  • $mailprogram = "/usr/lib/sendmail";
  • $mysqldatabasename = "mysql database name";
  • $mysqlusername="mysql username";
  • $mysqlpassword="mysql password";
  • $aclick=1;
  • $bclick=10;
  • $cclick=50;
  • $sale=2500;
  • $threshold = 2500;
  • $deadaccounttolerance = 10;
  • $destination = "http://www.yourdomain.com/clickthroughurl.html";
  • $emails="/path/to/cgi-bin/clickblaster/emails.txt";
  • $cgidir = "/cgi-bin/clickblaster";

$aclick is the number of "credits" you award for a primary clickthrough from the generated bannercode.   I would advise keeping this low so you don't pay out for lame "hit-and-run" traffic.

$bclick is the number of credits awarded when the same surfer reaches a special page of your site (using server sides includes to execute bclick.cgi).  When bclick.cgi executes it awards the affiliate a bonus credit value determined by $bclick (in this example its set to 10).  So when they hit the second hidden page (even if its 5 years later) the affiliate gets 10 extra CREDITS

$click is similar to $bclick - same concept.   You might want for example to place the server sides includes tag to execute cclick.cgi inside of your order page.  That way when a surfer is sent to you that is actually considering ordering your product you want to reward the affiliate heavily (here set to 50)

$sale is an optional reward that you can include on your "thank you page" or execute from your billing system.  This would (in this example reward the affiliate with a HUGE 2500 credit payout) for sending a referred sale.

$deadaccounttolerance is to sweepup accounts that are opened and then the affiliate leaves.  You can set cleanup.cgi to run by crontab (optional) and it will use this value as the number of days an account will remain active without sending traffic.  For example - here any account that sends no hits after 10 days is deactivated.  This will only occur if you are crontabbing /cgi-bin/clickblaster/admin/cleanup.cgi.  Note that you will need to put the FULL path to configure.cgi inside of cleanup.cgi since this is a cronjob.

$destination - duh.... thats the clickthrough url

$emails - this is the location of a text file you want to setup and chmod 777 so when you want to email all of your affiliates all their emails are exported to this handy file

$cgidir is just the relative URL (URI) to the clickblaster installation

Upload Your Edited CGI and Database Files

  • Upload all of the cgi files (.cgi) into a directory you create called "clickblasters" inside cgi-bin/clickblasters/
  • Make a directory inside of your /cgi-bin/clickblasters folder called admin and the files inside of the cgibin/admin directory after you unpack the tarball and upload the rest of the cgi files into here.
  • Make a directory inside of your normal webspace (http://www.yourdomain.com/clickblasters) called clickblasters and upload index.html and the login page here.
  • Make another directory inside of http://www.yourdomain.com/clickblasters/admin/ (called admin.. duh) and upload the admin index.html page. 
  • Password protect the cgi-bin/clickblasters/admin directory and the /clickblasters/admin directory  Read the tutorial section if you don't already know how to do this.

Chmod the files

  • Chmod all the .cgi files to 755.  Chmod everything else to 666 or 777 (email.txt)

Edit the signup.cgi html areas

  • Setup the default installation first.   Then customize the html the way you want it.  Then just cut and paste it into the signup.cgi script.  Backup your work first - take your time.... its not that hard...

Starting the system

Before you can do anything you need to login to the admin panel http://www.yourdomain/clickblaster/admin/ and hit the START button.   Otherwise nothing will work.  If you ever want to reset your system statistics just hit the start button again.