First published on February 24, 2007
I decided to do a spin-off of my custom anti-spam image plugin for WordPress since people kept asking for it to be made available normal forms. Check out the eZ Publish version of this plugin if you are running eZ Publish 3.8+.
So, here it is… version 1.1 contains the features found in version 3.0.3 of the WordPress plugin (such as auto-generated audio for visually impaired users).
Download version 1.1 of Peter’s Custom Anti-Spam for input forms (April 16, 2008)
February 24th, 2007: Version 1.0 (used by some savings institute)
- PHP 4 or 5
- MySQL 3+
- GD Library and FreeType Library
Note: I am assuming that you have already set up your own input form and that you are using PHP for both the page that displays the input form and the script that processes the form. Here’s an example input form and an example form processor (both for PHP). These are definitely not the best examples, so I’d advise you to do a web search for other examples! In particular, make sure to always validate input values…
1) Extract all files to a folder on your server, most commonly the same folder that contains the input form and form processor.
2) Update your database connection information in cas_db.php, then run cas_install.php. You can remove cas_install.php once the database tables have been created.
3) Make sure that the temp_sounds folder is writeable.
4) Update settings and translation strings in cas_engine.php.
5) Enter this in your input form (see example_inputform.txt for a basic framework) where you want the anti-spam image to display:
include 'cas_engine.php'; cas_comment_form();
6) Enter this in your form processor (see example_formprocessor.txt for a basic framework):
include 'cas_engine.php'; cas_comment_post();