Refer The World Version 2 Setup Guide.
©2001 Justin M. Clark
We do not permit you to edit, reconfigure, or re-engineer this script in any other way than the following fields below. We do offer custom versions of this script, if there is an option that you see missing, or would like to change something, please contact us first at Perl @ MyDesktopHelp.Com
If you have edited the script and it no longer works, we will look over the script and troubleshoot it for free as long as we are only making sure that your values are set correctly. However if we have to edit or reconfigure any other part of the script (unless it is an original error in the script) it will be at a rate of $50/hour in one hour increments. The first hour will be paid before any services are rendered.

Requirements:

RTW requires very little setup and configuration. First, RTW requires Perl 5 to be installed on the server. Also, in order for the email functions to work, the libnet Net::SMTP module or sendmail (if on UNIX host) must be installed in the server. Net::SMTP is a very common module and comes bundled with the latest release of Perl 5. 

Setup:

There are 15 settings that need to be configured in the script. First open the script in notepad or wordpad and make sure that word wrap is turned off, then configure the following settings:
All values must be preceded with "my" and surrounded by quotation marks unless otherwise noted.
All real paths must use "/" instead of "\" for example, if you use "c:\data" instead of "c:/data" the program will not work. Also, please do not enter "/" after the directory.
And All fields need to be defined unless otherwise specified.

my $title="My Domains Referral System";
This is the title that will appear on top of all pages in the referral program.

my $datadir="c:/datadirectory";
This is the real path to dir where user info is stored, i.e. "c:/datadirectory" must have "change" or read-write-execute-delete access for everyone

my $donedir="c:/datadirectory/done";
The directory where users are put once they reach the referral quota. Must be different that $datadir and must have "change" or read-write-execute-delete access for everyone.

my $target="http://www.mydomain.com";
This is your domain homepage.

my $redir="http://www.mydomain.com/home.htm";
This is the page that you would like the referral program to refer the users to when he clicks on the referral link in the email. 

my $finishpage="http://www.mydomain.com/confirm.htm";
Referral confirmation page

my $relay="mail.domain.com";
This is your SMTP server i.e. "mail.domain.com" UNIX users will have the $relay value replaced with $mailprog which is the path to sendmail.

my $adminemail='WebMaster@mydomain.com';
The email address of the person to alert when a user refers the quota you set above, Surrounded by singe quote '.

my $administrator="WebMaster";
The name of the person running the script. i.e. "Webmaster" or "John Doe"

my $ishtml="";
Set this option to 1 if you will be sending HTML emails from the script, leave empty or set to 0 in order to send plaintext emails.

my $quota="5";
This is the level number, i.e., 5 referrals is level 1, 10 = level 2, 15 = level 3....

my $quotamax="10";
This is how many levels you want to offer in your program with 10 set here, the highest number that can be referred is 50 people

my $counter = "5";
this is how many referrals you want to allow at one time on the referral page.

my $backimage="";
URL to the background image if you would like to supply one, i.e. "http://www.domain.com/images/background.jpg" This field is not required.

my $backcolor="#FFFFFF";
the color you would like your background color to be. i.e. "navy" or "#000080" Should be supplied at least white so that you wont conflict between different browsers. For example, if you leave this setting blank, in IE background will appear as white, in netscape it will appear black.
Here is a table that gives a list of common colors, i would recommend entering the "#FFFFFF" value instead of just the name of the color.
#FFFFFF=White
#000000=Black
#008000=Green
#000080=Blue
#FF0000=Red
#FFFF00=Yellow
#FF6600=Orange

my $fontcolor="#FFFFFF";
the color you would like all fonts and horizontal lines to be. i.e. "navy" or "#000080" Should be supplied at least white so that you wont conflict between different browsers. For example, if you leave this setting blank, in IE background will appear as white, in Netscape it will appear black.
The table above works the same way with this value, i would recommend entering the "#FFFFFF" value instead of just the name of the color.


Also, there is a file called body.txt This must be located in the $datadir folder. You may also edit this text document to the message that you would like the referral to see. There is 3 fields in the document that must be there and will be replaced by the script when the email is sent. A description follows:
<--toname--> This is the name of the Person that the referral is being sent to.
<--link--> This is where the referral link will be placed in the email.
<--fromname--> This is the name of the person that referred the user.
All 3 fields are case sensitive, so be careful when retyping or the person will receive the wrong email.

An example of the file is here:

Dear <--toname-->,

I found this great site today, it's called MyDomain.com.
They have lots of things you would be interested it.

Go check it out by clicking here:
<--link-->


Your Friend,

<--fromname-->

Now, lets say that George is referring Bob, when the email is sent, it will look like this:

Dear Bob,

I found this great site today, it's called MyDomain.com.
They have lots of things you would be interested it.

Go check it out by clicking here:
http://www.mydomain.com/...


Your Friend,

George


Using RTW:

1. Setup all the variables above.
2. Test the script by referring yourself
3. type in the URL to the script and add ?admin to the URL This will ask you to set a password. please remember this password, and it is case sensitive.
4. Then return to the ?admin page and enter your password you just set.
5. This page will allow you to view all users who have referred someone, and who they have received credit for as well as what users have met the referral quota.
6. There are log files of all referrals, referrers, and returns on the admin view page, you can clear the logs at any time. but clicking the hyperlink.
returns.log is log of referrals that have returned.
referrals.log is log of people that have been referred by someone.
referrers.log is log of people that have referred someone.