Stop Form Spam Script

Version .03 of the “Stop Form Spam” PHP Script is now officially released for public testing and comment.  We encourage you to try this free PHP script and tell us how it works out.  Feel free to link to where your form is in the comments below (we “do follow”) and even provide a link to your home page if you desire.  Please also add your ideas for future versions.

About the Stop Form Spam Script:

Version .03 of the Stop form Spam script is easy for users to use, is open source (meaning you can change it), is free and easy enough for even an entry level  (but fully qualified) web designer to implement.  Most of all this latest version has so far been shown to be 100% effective against form-spam bots.

Features of the Stop Spam form:

  • Randomly generates 2 numbers between one and ten and asks the user to add them together
  • By design it’s immune to the PHP E-Mail Injection vulnerability
  • It’s designed for entry level web designers to be able to customize and implement easily
  • Documentation right in the code
  • The Stop Form Spam script also prevents direct access to the form handler.
    • Accessing the form handler directly is most malicious of instances. This usually means that it is a bot, not a human and they are probably probing for vulnerabilities or trying to steal content. In these cases these users are immediately sent a different page with the message of your choice and the form info is not sent to you (it would be blank anyway!)
  • While technically a Captcha script in the true definition of Captcha, it is called a non captcha script by some because it is non image based.
Stop Form Spam

Stop Form Spam download

The code for the Stop Form Spam script comes in three portions.  The page with the form, the form handler itself and an additional page for the most malicious instance, those who try access the form handler directly, without using the form at all.

Download the source code

View the Demo


Future Versions

  • Why does it need the sorry.php page? We could just have a third message embedded into the form handler.
    • OR we could three different results pages:
      • One for an incorrectly filed out math question,
      • One for a correctly filled out form
      • One for direct access to the handler
    • The benefit would be the ability to track how many people didn’t fill out the form properly and how many people and/or bots tried to access the page directly.
      • The feedback so far is that people want the third page, so, for now, it stays.
  • Why a math question at all? Why not just randomly generate 1 number, echo it to the screen, and then ask them to duplicate it?
  • Other Notes:

    This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A  PARTICULAR PURPOSE. See the GNU General Public License for more details.

    Please note this script builds upon the idea/script called “Math Guard” This script is loosely based on the .02 version.

5 Responses to “Stop Form Spam Script”

Leave a Reply

CommentLuv badge

Switch to our mobile site