I made a Free Contact Form PHP Script with image captcha - contact.php
It includes a captcha with audio and a refresh feature.
You can see my contact form here
http://www.642weather.com/weather/contact_us.phpFeatures:Tested code (has been running on several sites for several months with no problems)
XHTML Transitional compliant
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.
(see readme.txt inside the zip 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. (enable or disable with a setting)
E-mail message shows IP address and user agent (browser version) of user who contacted you
Captcha Image by www.phpcaptcha.org included (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.
Version: 1.4 - 28-Jan-2010 - Added setting to enable or disable form fieldset border.
- Simplified blank field messages (and removed the word "error" from them).
- Text labels changes: 'E-Mail' change to 'Email', 'e-mail' changed to 'email'.
- CAPTCHA function can now report server cookie problems.
Version: 1.3 - 21-Nov-2009 - Compatible with SecureImage CAPTCHA library version 2.0
Be sure to also upgrade to SecureImage Library version 2
To upgrade the library: delete your old /captcha-secureimage/ library folder and replace with this new one:
Download the library here:
http://www.642weather.com/weather/scripts/captcha-secureimage.zipnote: the old library would still work, except it is less secure and has less features.
New CAPTCHA features include: increased CAPTCHA difficulty using mathematical distortion, streaming MP3 audio of CAPTCHA code using Flash, random audio distortion, better distortion lines, random backgrounds and more.
- New contact form option $enable_captcha_audio_flash enables streaming MP3 audio of CAPTCHA code using Flash
Version: 1.25 - 29-Aug-2009 - Improved ctf_validate_email function and fixed a bug that invalidated email address with upper case (introduced in last version)
Version: 1.24 - 27-Aug-2009 - fixed deprecated ereg_replace and eregi functions for PHP 5.3+ compatibility when error warnings are on
Version: 1.23 - 11-Aug-2009- added BCC(Blind Carbon Copy) email feature in settings
Version: 1.22 - 27-Mar-2009- added an optional Double E-mail entry setting. Enabling this requires the user to enter their email two times on the contact form.
Version: 1.21 - 27-Mar-2009- added a optional "redirect to home page" feature (upload the ctf-loading.gif and contact.php, then look for the new settings to enable inside contact..php)
Version: 1.20 - 19-Mar-2009- fixed unclosed div after message sent
- a few spelling corrections for code comments and displayed error codes
Download links:Required library:(this has to also be installed)
http://www.642weather.com/weather/scripts/captcha-secureimage.zipContact Form (see readme.txt inside the zip for full instructions):
http://www.642weather.com/weather/scripts/contact-form.zipI now offer a special plugin version just for the Weather Display/PHP/AJAX Website USA Template SetIt is exactly the same contact form as my contact.php except this version it is inside a template page called wxcontact.php
wxcontact.php Contact Form (see readme.txt inside the zip for full instructions):
http://www.642weather.com/weather/scripts/wxcontact-form.zipIt is only English language at this time (it does not have any multi language features)
Here is a sample contact email message: (my real ip has been masked for this post)
------------------------
Sent from Long Beach Weather contact form
To: Webmaster
From:
Mike Test
mike@somewebsite.comMessage:
This is a test to show what the email message looks like
Sent from (ip address): 68.118.xxx.xxx (68-118-xxx-xxx.dhcp.xxx.xxx.charter.com)
Coming from (referer):
http://www.642weather.com/weather/contact_us.phpUsing (user agent): Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0