Chapter 13: Getting Subscribers

Google

List server basics

A list server is a software program that allows you to add/drop subscribers manually, automatically or both. It allows you to send a message to a certain address and then mails copies of the message to everyone on your list. It may have other functions that vary from one program to another.

Some list servers are operated by list hosting companies such as Topica and Yahoo! Groups. When you host your list with them, whatever feature set they provide becomes available to you. Other list servers are operated on your own PC or Mac. Some of these use your ISP to send out all the mail. This can introduce a few problems such as low speed, poor reliability and the occasional complaint from your ISP.

Still others exist in the form of software such as Lyris that you buy and install onto a dedicated server. Your host may have installed list servers on their servers that you can use. Many hosts give you a control panel such as cPanel or Plesk. If yours does then look on the control panel for a link or button that will create your mailing list.

Note: If your host provides a mailing list feature, be sure to find out if there are any limits on its use. How many subscribers can be on a list? How many messages can you send per day? How many can you send per month?

Tip: If their answer is "unlimited", you'll save some money. If there are limits and they're too low you'll eventually need to find (and pay for) professional list hosting. Consider this a cost of doing business.

Regardless of the type and features of your list server, your goal is to use it to keep in touch with a growing list of people via email. This can take the form of a discussion list, an update list or a regularly scheduled newsletter. In all cases you want to keep adding new subscribers. How do you do that?


Manual subscription

Some people manage their lists by hand. In this case a subscription request may be a short message to one of their email addresses with something like "subscribe" or "join" in the subject or body of the message.

An unsubscribe request would be similar but might contain "remove", "leave" or "unsubscribe". The name of the list may be part of the message. The list owner uses some type of program to maintain the list which allows adding or removing email addresses. I personally don't care for this method; it seems too much like work.


Automatic subscription

Most list server software provides you with a "subscribe" and an "unsubscribe" address. Any person can send a (usually blank) message to one of the addresses and be automatically added to, or removed from, your list. This may be used on a Web site in several ways. Post a mailto: link for people to click on, add a form or use a pop-up window.

Most of the time the Web site mechanism is designed only for subscribing, with the unsubscribe process built into the outgoing messages. Sometimes it's a link. Sometimes it's an address to copy and paste. Other times, replying to the message will get you unsubscribed.

Any time you have people subscribing from your Web site, you have opportunities to use PHP scripts. Clicking on a link could trigger a script which sends out the current issue immediately. Perhaps you are going to deliver a message to new subscribers telling them where to pick up a thank you gift. Remember that giving people a tangible reason to subscribe will often help increase sign-ups.

Let's say you have this form on one or more of your web pages:

<form action=$PHP_SELF method="post">
First Name: <input type="text" name="name" size=30 maxlength=15>
Email Address: <input type="text" name="email" size=30 maxlength=75>
</form>

But wait? What's $PHP_SELF? OK, it's like this: if you've named the page that the form is on form.php you can put the PHP script for handling the form right on the same page with the HTML, including the form itself. Then when the Submit button is clicked, the same page is loaded but now it runs the script.

If all is well, you can make the form vanish and be replaced with a "success" message on the screen. You put a block of PHP code which contains the instructions for sending the message right on the page. You'll need to use some "logic" to make it behave exactly right but it's really not that hard to do.

If the email address is missing, tell the script not to send the message. This would be a good place to filter out undesirable addresses to keep spammers and other autoresponders off your mailing list.

Find a PHP script that does what you want it to do and plop it onto the page. You can add your own extra features to a basic script and get more bang for the buck.

Perhaps you'd like to collect some information about the person at the time they sign up. A script could save the results of a brief survey you asked them to fill out. The results could be stored in a file or a database for analysis. The more you know about your subscribers, the better equipped you are to offer them what they want.

Let's add a survey question to the form.

<form action=$PHP_SELF method="post">
First Name: <input type="text" name="name" size=30 maxlength=15>
Email Address: <input type="text" name="email" size=30 maxlength=75>
Do you like PHP? <input type="radio" name="likePHP" value=1 > Yes
<input type="radio" name="likePHP" value=0 > No
</form>

Now we add some code to the PHP script to log the response. While we're at it, we might as well record the date and time, email address, IP address, referring URL and browser version.

<?php
$file = "/cgi-bin/subscribers.txt";
$date = date("Y-m-d h:i:s");
$ip = getenv("REMOTE_ADDR");
$url = getenv("HTTP_REFERER");
$browser = getenv("HTTP_USER_AGENT");

$handle = fopen($file, "a");
$line = "$date|$email|$ip|$url|$browser|$likePHP\n";
fwrite($handle, $line) or die("Couldn't write to file");
fclose($handle);
?>

Previous Page   Table of Contents   Next Page

Copyright © 2004 Steve Humphrey