Free Contact Form PHP Script with Image Captcha by Mike Challis
Problem:
Did you know that spambots crawl over websites looking for email addresses,
when they find one they add it to their database for junk email?
If you publish your email on your web site, like in this example....
you@somewebsite.com
... then your email will most definitely start getting lots of spam.
It is foolish to have your email address 'in plain sight' on your websites,
because harvesting them is one of the biggest ways that spammers get huge lists of email addresses to spam.
Solution:
Use my contact form php script so that your email address is completely concealed.
What does it look like?
You can see it in use on my
contact us form.
How use it?
Just download the file, adjust a few settings at the top, upload it to your web server.
Please refer to the readme.txt file in the download zip file for install instructions.
Be sure to download both zip files, one is the
contact-form.zip and the other is the
captcha-secureimage.zip
(the required library for the captcha feature)
Some of the many features include:
- Tested code (has been running on several sites for several months with no problems).
- XHTML Transitional compliant.
- Section 508 and WAI Accessibility HTML Validation.
- Accessibility features contributed by Kevin Reed at www.tnetweather.com (Thanks Kevin).
- Reloads form data and warns user if user forgets to fill out a field.
- No need to press back button.
- Optional redirect to home page after message sent.
- Validates syntax of email address (user@aol = bad, user@aol.com = good).
- Use as a standalone page or incorporate into your site template.
- It can run on most any webserver as long as you have PHP installed, and GD support within PHP.
- CSS basics for the form to allow easier enhancement.
- Multiple mail to contacts dropdown (optional).
- (see readme.txt inside the zip file for full instructions).
Security:
- It has very tight security, it stops all the spammer tricks I have found.
- Filters all form inputs from html and other nasties.
- Spamchecks email address input from common spammer tactics...
prevents spammer forcing to:, cc:, bcc:, newlines, and other email injection attempts to spam the world. - Make sure the form was posted from your approved host name only.
- E-mail message shows IP address and user agent (browser version) of user who contacted you.
Captcha Image Support:
- Captcha Image by www.phpcaptcha.org is supported (enable or disable with a setting).
- Open-source free PHP CAPTCHA script.
- Abstract background with multi colored, angled, and transparent text.
- Arched lines through text.
- Generates audible CAPTCHA files in wav format.
- Refresh button to reload captcha if you cannot read it.
Download it: [download contact-form.zip] | [version change log]
Required SecureImage Library:
(this has to also be installed for the captca to function)
[download captcha-secureimage.zip]
I now offer a special contact plugin version just for the
Weather Display/PHP/AJAX Website USA Template Set.
It is exactly the same contact form as my contact.php except this version is inside a
template page called wxcontact.php (see readme.txt inside the zip for full instructions):
Download it: [download wxcontact-form.zip]
Gratuity
This php code provided "as is," and Long Beach Weather (Michael Challis) disclaims any and all warranties, whether express or implied, including (without limitation) any implied warranties of merchantability or fitness for a particular purpose. Use of this code signifies your acceptance.



