PHP LogoLeader - Documentation


[Download Now | Requirements | Online Documentation | Register ($10)]

Welcome to the online manual for Leader. This documentation is divided into several parts:

Installing Leader:

Leader is fairly simple to install. First, you need to make sure that your web server meets the following requirements: support for PHP3 or newer, access to sendmail, and the ability to execute CGI scripts. If you're not sure whether or not your server meets these requirements, you can install the test script (more information below).

Assuming your server meets the requirements for Leader, you're ready to go. Unzip the leader.zip file that you downloaded. Inside you'll find the following files:

Note that the script's name ends in .cgi, not .php. This is important, you should leave it that way unless it causes problems, and you can find out why in the Tech Notes.

The first thing you'll need to do is open up the leader.cgi script. You should open it up in a plaintext editor, like Notepad or SimpleText. Near the top of the script, past the description and copyright information, you'll find a section titled "Configuration." Set all of the variables to the values you'd like to use. If you need some help with this, check the Variables section of the manual below.

Once you configure the variables in the script, edit 1.txt and 2.txt to include the contents of your first two messages. Don't add greetings to the templates: "Dear (name)" is automatically added by Leader when it sends the messages. If you want more than two messages, put each one in a separate text file and name it appropriately - your third message would go into 3.txt, your fourth message would be 4.txt, etc.

Edit goodbye.txt to include the "goodbye" message you want people to see if they remove themselves from the list. By default, the file is empty (there's no message). You can put plain text or HTML into goodbye.txt. HTML is useful if you want to give people a link to email you or visit your page when they remove themselves from the list - sort of a "last chance" effort to get them to come back.

Don't make any changes to database.txt. Leader expects it to be empty the first time you run the script.

Now, upload all of the files in ASCII mode to a directory on your web server. I recommend creating a new directory called "leader" in your document root. If you have to put CGI programs into a cgi-bin folder in order to run them, upload all of the files into there. Once they're uploaded, you need to set their permissions to 755. You can do this with the chmod command. Most FTP programs like WS_FTP also let you do chmod (755 = owner RWX, group R-X, world R-X).

If you made it this far, Leader is totally installed. Go to the Using Leader section to see how to run it!


Variables/Configuration

This section of the manual deals with the variables you need to configure in your copy of Leader. If you're having problems or you don't know what values to use, hopefully you'll find some help here. The variables used by Leader are listed below, along with explanations and example values. When editing the variables - especially the $subject[] variables - make sure that you keep the proper formatting (quotation marks, semicolons, etc) intact.

#!/usr/bin/php on the first line of the script is called the "shebang" line. This should point to PHP on your web server. If you get an error message that /usr/bin/php can't be found, contact your webhost's technical support and ask for the location of PHP. Then change the first line of the script to point to the correct location. Leave the hash mark and exclamation point as they are.

$adminemail should be set to your email address. When Leader sends outgoing email messages, it uses the value of $adminemail as the "From:" address. Note: technically you can specify any email address here. However, I strongly suggest that you use your true email address! Using someone else's address, or non-existant addresses, as the source of your messages can get you in trouble. Example delcaration:

$adminemail = "you@yourname.com";

$subject[] is an array (a group) of values. Leader will use the values specified in the $subject[] array as the "Subject:" line of outgoing emails. Leader also uses the $subject[] array to figure out how many messages are in your series. For this reason, it's important that you set this variable up correctly!

You need to establish a different value of $subject[n] (where n represents the message number) for each message Leader will be mailing. For example, if you're sending a series of three messages, you want to define $subject[1], $subject[2], and $subject[3]. If you're sending a series of 10 messages, you'll need to define $subject[1] through $subject[10]. It's very important that you define the correct number of $subject[n] values - if you define too few, messages without defined subjects will not be sent; if you define too many, Leader will not work!! Each $subject[n] declaration needs to be on its own line. Example declaration using three messages:

$subject[1] = "About Our Company";
$subject[2] = "Our Excellent Line of Products";
$subject[3] = "Joining Our Company is Easy!";

$location is the URL (http://wherever) to your copy of Leader. Leader uses this value for several things, most importantly to build the "Remove Yourself" link which is appended to each email. Make sure the URL is correct and points to the Leader installation on your site. Example declaration:

$location = "http://www.shat.net/php/leader/demo/leader.cgi";

$delay is the number of days Leader should wait between messages. If you want people to receive one message a day, $delay should be 1. If you want people to get a message every other day, $delay should be 2. To separate mailings by a week, $delay should be 7, and so on. Example declaration for sending one message per day:

$delay = 1;

$goodbyefile is the name of the file which contains your goodbye message. By default, it's set to "goodbye.txt" (which is included with the Leader distribution). If you don't want to use a goodbye message, you can set the variable to "" (two quotation marks with nothing between them). Example declaration:

$goodbyefile = "goodbye.txt";

$notify specifies whether or not you want to be notified when people remove themselves from the list. If you do want to be notified, set $notify to 1, if you don't want to be notified, set it to 0. Example declaration:

$notify = 1;

$notifyemail is the email address which will receive any mail generated by $notify. You should set this to your email address in most cases. If you have set $notify to 0, you can set $notifyemail to "" (two quotation marks with nothing between them). Example declaration:

$notifyemail = "you@your.com";


Using Leader

Using Leader is, at least in my opinion, pretty simple. All you have to do is visit the URL to your installed copy of Leader, appending the string "?function=admin" (without quotation marks) to the URL. For example, if Leader is installed at http://www.your.com/leader/leader.cgi, you'd have to visit http://www.your.com/leader/leader.cgi?function=admin. The main menu will appear and use of the program is straightforward.

Adding a Lead

When you have a new lead or prospect, starting the mailing process is simple. Just run Leader, enter the prospect's name and email address, and click the "Add New Lead" button. The prospect will be added to your database and the first message in your series will be mailed to them automatically.

Removing a Lead

If you want, you can manually remove someone from the mailing list. Just enter their email address and click the "Remove Recipient" button. Their email address will be removed from the database and they won't get any more mail from you. Normally you won't need to do this, because your recipients can now remove themselves with a simple click.

Processing Messages

Every day you shoul run Leader and click the "Process Today's Messages" button one time. If you accidentally miss a day, that's OK, your recipients will just get their next message a day later than scheduled.

Recipient Expiration

Leader handles expiration by itself. When someone has received your entire series of messages, they will be removed from the database and placed into a file called expired.txt (in case you want to collect and use that information later). You'll get notices of expiration cleanup when you Process Today's Messages.


Registering Leader

Leader is $10.00 shareware. If you install and use it, you are obligated to register it. The downloadable version of Leader is not crippled in any way. I don't believe in forcing people to pay for software; however, if you do make use of Leader I'm trusting you to pay for it. If gradual mailings with Leader help you to recruit even one new prospect into your business, Leader will have already paid for itself. Consider it a sound investment.

By registering Leader, you will obtain a One-Site License which allows you to install as many copies of Leader as you like on a single website. If you plan to use Leader on several different websites, you should purchase a new license for each site.

Payments are accepted via PayPal, credit card, cash, or check. Click the appropriate link below to register.

Click here to register using Mastercard, Visa, American Express, Discover, Diner's Club, Eurocard, JCB, cash, or check.
PayPal
Register Leader through PayPal

Tech Notes

CGI vs PHP extension: "If it's a PHP script, why does its name end in .cgi instead of .php?" Several beta testers asked this question so I figured it was worth noting here. The full explanation would involve details of unix permissions, suexec, and other things the average user might not know about, so I've tried to condense it into something that makes sense.

In a nutshell, you're best off leaving the .cgi extension on the script, and not renaming it to leader.php. Native PHP scripts - that is, those scripts whose name ends with .php - run under the username "nobody" on your web server. Naturally, user "nobody" does not have permissions to create, modify, or delete any files in your directory on the server... And because Leader's backend functions revolve around creating and modifying the database files, if you rename Leader to leader.php you're going to encounter all sorts of "permission denied" errors. Leader's not going to run.

On most web servers, however, there's a workaround: name the script as a .cgi, and specify the location of PHP in the "shebang" line (the first line of the script). This works because CGI scripts typically execute under the username of their owner... Your username. Thus when the script runs under your username, it does have permissions to create, modify, and delete files in your directory and everything should work properly.

Known Limitations: No major limitations at this point.

You really, really should run the Leader script and Process Today's Messages once a day. Missing a day is no longer a big deal (in previous versions it would completely throw off the mailing cycle) but you'll appear more professional if your messages arrive when you say they will.

I recommend running Leader via a cron job, if you have access to cron on a unix machine. The following commands will both get the job done:

perl -s /filesystem/path/to/leader.cgi --function=cycle > /dev/null
lynx -dump http://path/to/leader.cgi?function=cycle > /dev/null

TODO:


Leader Test Script

Before downloading and installing Leader itself, you should download and run the Leader test script. It will check to make sure your server supports everything that Leader needs. Click here to download the script in .zip format. Upload the script in ASCII mode to your server, name it leadertest.cgi, then access it through your browser and see what the results say.




Copyright 1999-2008 Shaun - Use this form to contact me.
This page looks best in every browser. That's why it doesn't have lots of bells and whistles.