Reduce SPAM with a PHP Contact Page
Version 1.1.0 Date 11-27-2005
If you are using version 1.0.0 of this ccontact page please replace it immediately with this one or one that performs checks against user input on the address and subject lines. Spammers are trying to use contact pages to send illegal email. This page is more secure than version 1.0.0 and there will be a version 2.0.0 of this page which will have more features to make it more secure. This page provides an ability to have someone alerted when attacks are done by spammers.
Reducing SPAM has become a important part of operating on the internet today. This document will provide a PHP contact page which webmasters can use to keep their e-mail address hidden from SPAM robots.
Additionally, this contacts page allows webmasters to easily modify the contacts page when their e-mail address changes to reflect the new value of their e-mail address. They do not need to change multiple pages where an e-mail address may be embedded inside HTML code. One thing to remember when using the contacts page, however, is that when you reply to your readers, you are giving them your e-mail address, so only reply to those who you believe you can trust to not sell your e-mail address. Otherwise find a way to disguise your e-mail address.
In the interest of reducing SPAM, I am granting a licence to all webmasters to use and modify this code. All I ask is for a link back to this website and the credit for the original code to be given to the Computer Technology Documentation Project.
About the pages
Two contacts pages are provided. The first contact page is a simple page with a form embedded where the user can type their e-mail, add a subject, and type their message. There is no capability to provide for web site style.
Contact Page 1 - The simpler page
This page is named contact1.txt. It has been renamed with a text file extension so you can easily view and copy it. To use it, copy and save it and rename it "contact1.php". There are four variables which can be changed in this contact page. They are:
Contact Page 2 - The page using a template HTML file
This page is named contact2.txt. It has been renamed with a text file extension so you can easily view and copy it. To use it, copy and save it and rename it "contact2.php".There are six variables which can be changed in this contact page. They are:
Here is a link to the sitetemplate.html sample template file. You can right click it and select "Save target as..." in Internet Explorer to download it. Its text is as follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Arachnophilia 3.9">
<meta name="description" content="!!description!!">
<meta name="keywords" content="!!keywords!!">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<link href="style.css" rel="stylesheet" type="text/css">
<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
<table cellspacing="0" cellpadding="0" border="0" class="main">
<a href="/morepics/Birthdaycakeballoon.jpg" target="_blank" onMouseOver="window.status='Photos courtesy of the CTDP, Free for use' ;return true" onMouseOut="window.status='';return true"><img src="/morepics/Birthdaycakeballoon.gif" alt="Birthday Cake balloon"></a>
<td style="width: '100%'"><br>
<a href="/morepics/purplepeopleeaterfromside.jpg" target="_blank" onMouseOver="window.status='Photos courtesy of the CTDP, Free for use' ;return true" onMouseOut="window.status='';return true"><img src="/morepics/purplepeopleeaterfromside.gif" alt="Purple people eater balloon from the side"></a>
<img src="/gifs/ctdp1.gif" alt="CTDP">
<td class="right" width="25%">
To use the contact page 2 and the sample template file:
One feature that I could add to this page is an ability to display some graphic text which must be typed in by a user to use this page. This would prevent a SPAM robot from automatically using the page to send you e-mail. If anyone wants this feature, please feel free to use our contacts page to send the request to the webmaster.