Author Topic: Contact Form PHP Script with Image Captcha - contact.php  (Read 16250 times)

0 Members and 1 Guest are viewing this topic.

Offline mchallis

  • Member
  • *
  • Posts: 45
    • Long Beach, WA Weather
Contact Form PHP Script with Image Captcha - contact.php
« on: September 24, 2008, 11:09:38 PM »
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.php

Features:
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.
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 carbon copy, 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.14 - 04-Sep-2008
- added feature: Optionally you can change the default mail SMTP settings
- changed the display of input errors, each input error now displays exactly above the corresponding input field,
  the way it was before, the messages were all displayed in one bunch above the form.
- added a input error for captcha field not filled in rather than just saying the captcha did not match.

Download links:
Required library:(this has to also be installed)
http://www.642weather.com/weather/scripts/captcha-secureimage.zip

Contact Form (see readme.txt inside the zip for full instructions):
http://www.642weather.com/weather/scripts/contact-form.zip

I now offer a special 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 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.zip

It 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.com

Message:
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.php
Using (user agent): Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0
« Last Edit: October 28, 2008, 04:10:29 PM by mchallis »