Documentation
CLICKTRADERS LINK EXCHANGE SYSTEM: V1.0

WARNING - THIS IS FARILY ADVANCED CGI CODE
Our support policy confines us to answering
SPECIFIC questions about the installation. We do not teach perl, systems
configurations or unix as part of the membership.
If you require this level of support you will have to pay for installation.
Feel free to give it a shot - if you have the time and like to learn you are on the
right page. For more information regarding support policies read the FAQ. If you
prefer to have the system installed for you simply contact PSYBERCORE to have this
arranged.
Preleminary Material for review
System Requirements
- Perl 5
- Mysql
Database Software
- Msql-Mysql Module
- DBI
Module
- SSLEAY/Open
SSL required for using port 443
- Sendmail
- Crontab Recommended to use bulk email feature
- Supports Authorize.net Version 3.0 or Syntax
Verification
- Unix, Linux or NT Operating System
- Secure Webspace with CGI Capability
Recommended
- Online merchant
account required for real time validation
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.
- If you need to review or learn the basics of
CGI and Perl visit the tutorial
- Download the tarfile for this program and
save it to your desktop.
- 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.
Configure the .cgi files
configure.cgi
This is the entire cgi. There are
several variables to edit, all of which should be pretty straightforward.
$localurl =
"yourdomain.com";
$datadirectory =
"/path/to/cgi-bin/superlinks/data";
$cgiurl =
"http://www.yourdomain.com/cgi-bin/superlinks";
$admincgiurl =
"http://www.yourdomain.com/cgi-bin/superlinks/admin";
$buycredits=
"http://www.yourdomain.com/superlinks/buycredits.html";
$webmasterurl =
"http://www.yourdomain.com/superlinks/webmasters";
$mysqldatabase = "your mysql
database name";Name of your mysql
database. If you are using a seperate mysql
server Set $mysqldatabase to databasenameServername
$mysqlpassword = "your mysql
username";
$mysqlusername = "your mysql
password";
$mailprogram='/path/to/sendmail';
$validation = "syntax"; uses syntax validation by default.
authorize.net integration optional
$admin = "admin"; do not change
$adminemail =
"you\@yourdomain.com"; do not remove backslash
$height = "60"; forced height of banner
$width = "480"; forced width of banners
$border= 0; forced border width around banners
$flood=2; set to 100000000 to flood your account
$accountflood = "star"; account that will be flooded if you set
$subtext = "<br><font
face=Arial><small>CGI developed by <a
href=http://www.superscripts.com>superscripts.com</a></small></font></center>";
$attrition= 2; each impression reeived costs 2 credits 2:1
$impressionreward = 1; number credits earned for an impression
$clickreward = 10; number credits earned for a click
#############################################################################
# Determine charges per credits - COVERED BELOW
#############################################################################
if ($ACCOUNT eq "1000"){
$AMOUNT = 4.95;
$CREDITS = 1000;
}
if ($ACCOUNT eq "2500"){
$AMOUNT = 9.95;
$CREDITS = 2500;
}
Prepare your cgi-bin directories and upload
files
Create the following directories inside of
your cgi-bin and upload files as indicated below. Note that the configure.cgi file
is used TWICE - its the EXACT same file just upload 2 copies as shown below.
- /cgi-bin/superlinks/
- add.cgi
- banners.cgi
- buycredits.com
- configure.cgi
- get.cgi
- login.cgi
- modify.cgi
- premodify.cgi
- reset.cgi
- stats.cgi
- /cgi-bin/superlinks/data
- error.html
- thankyou.html
- schedule.db
- message.txt
- /cgi-bin/superlinks/admin
- admin.cgi
- adminstats.cgi
- bulkemail.cgi
- configure.cgi
- modify.cgi
- quemail.cgi
- scan.cgi
The rest of the files
Now create 3 more directories and upload
files as follows
File Access Permissions
File access permissions must be set correctly
for this program to run. You must set the access permissions for each of these
files. Set all the .cgi files to 755. Set all the rest to 777.
Misc Notes
$subtext This
variable is the html of any subtext you want to appear under every banner on your
system. DO NOT use quotes because they will interfere with the software. My
advice is DO NOT change this until you get the rest of the installation working
first. Then go back and tweak it as you wish
flooding This
system allows you to flood the entire link exchange network with any banner of your
choice. This is done through modifying the $flood and $accountflood variable.
Set the variable $flood = 100000000 or some HUGE number and set $accountflood to the
username of the account you want to have served all over the banner network. Once
this is done everyone with your linkcode on their page will see only the $accountfloods
banner.
rewards/attrition
3 variables determine the payout of your link exchange. $attrition is
the virtual "COST" of each impression one of your user receives on the link
exchange network. Thus everytime their banner shows up their available credits
decrease by $attrition (set to 2 by default). $impressionreward is a reward for
serving UNIQUE impressions to the network. Thus, when a user serves a UNIQUE
impression they earn $impression rewards credits. $clickreward is an additional
reward you can use to payout additional credits for people that send UNIQUE clicks into
the system. When a new user signs up they get 100 credits. If they do not get
much traffic they will slowly run out. When they are down to 0 credits their banner
will no longer be in the available pool. They can BUY credits though.
purchase credits
When a user logs in to check their statistics they can modify their
information, get the link code, and BUY additional credits. The system is setup by
default to do this by syntax only. There are routines for using authorize.net but
you will need a programmer to help you with those.
More on running the system
The admin interface allows you to browse,
edit, getinfo, modify, and delete any member on your system. You can also bulk email
all of your users but this requies a crontab file setup to execute the following script
daily.
bulkemail.cgi
You will need to change the require
"configure.cgi" file to the full path to configure.cgi file (inside of
bulkemail.cgi). This may also require some system tweaking to get it to work
depending on your isp.
For more information interfacing to
authorize.net See the authorize.net documentation for
any confusion regarding the structure/syntax of the form fields and their required values.
Setup Admin account
Before you launch your program make sure you setup an account
for yourself FIRST. This is required to get overall statistics through the admin
panel. Make sure you use the USERNAME="admin". The rest of the data
you can set to whatever you want.