David C. Dalton
Web Application & Database Development, Responsive Website Design, Programming & SEO Services
It’s an ever preset problem that plagues every website owner, freaking form spam. Some moron builds a bot or tries to hack your contact form in an effort to try and grab quick links or send out emails. Maybe, just maybe, I found an answer.
Stopping Form Spam With AJAX and Captcha
As my Article Site Manager Application™ became more popular more of the sites that ran it started experiencing the same problem. Hundreds of bogus articles were being submitted, thousands of fake contact forms being sent and even more fake requests for links, all of them nothing more than form spam. At first I approached the problem like most other developers, by adding a captcha image verification system, but that only slowed the nonsense down. I had to fight fire with fire!
About the same time I renewed my interest in AJAX applications. After some thinking I came to the conclusion that I could possibly stop 99% of this spam if I combined an AJAX submitted contact form (or any form) along side the standard Captcha image verification.
After some testing and a few failures I came up with a two part form system. Simply put anyone submitting any type form would have to do the following:
- Fill out the submission form as any other form
- Submit the form
- Review the formatted submission, enter the Captcha image verification number and then submit the information
Ill update this article after we have run this for a few months and let you know but I will say that in the first week of running this new code I have yet to receive one spam submission!