block spam

Add to your form processing script to block form submissions that include blocked words or IP Addresses effectively stopping all form spam including automated scripts and user submitted.

It is designed to run with most php based form processing code including form1.

How is Form Spam Blocked?

In the script you simply set blocked words by inputing words to block in lowercase letters and/or IP Addresses directly into the script. The script handles multiple words or character combinations and IP Addresses, each word or IP Address is separated by a comma (ie ,) . If a block word value appears in any form field when the form is submitted or it is submitted by a blocked User IP Address form processing will be stopped, no delivery email is sent and nothing is displayed. This gives the submitter no where left to go.

Using the block words you can prevent any form submission that contains a blocked character combination. The character combinations can be set as anything you like. The most common use is to block specific words but you can also Block by User IP Address.

Blocking code use

  1. In the code textarea edit the blockwords values in the $blockwords=""; variable. Input words (character combinations) in lowercase letters and each IP Address to block, separated by a comma between the " " 's,
    example $blockwords="casino,badword,193.160.28.13";
  2. If you want to Block by User IP Address please refer to the Additional Points at Block by User IP Address.
  3. Copy and paste all the block spam code (including the php start and end tags) to the very top of your form processing code above all other code.
  4. Upload and give it a test.
  5. Only edit with a text editor (ie notepad) to ensure the php code is not corrupted.

If a block word character combination appears in any form field when the form is submitted or it is submitted by a blocked User IP Address form processing will be stopped, no delivery email is sent and nothing is displayed.

Block by User IP Address

  1. To block by IP address you must know the IP address used for form submissions you what to block. form1 processing includes the IP address of the form submitter the form delivery email. From this you can determine IP Addresses to block.
  2. Some IP address are dynamic and may change or may be common to multiple users.
  3. To Block by User IP Address simply add each IP Address to block to the $blockwords variable.

Code

Code runs on your web server and your server must support the php scripting language. Most commercial web servers support php. For information on php and how to check if it is available on your server goto What is php?

Additional form processing, spam blocking options and information...