How I cut my spam in half

john | Sept. 16, 2024, 7:50 p.m. Programming

It's not every day one has to deal with contact forms, but when one does.  One has to get creative.  At first, it was something that I didn't give much attention too.  It's a simple contact form, shouldn't be too much of a hassle.

Then of course it happens, the spam starts coming in.  First it's a lot, then it's more, then lastly, it's a bunch more.

Granted, I'm starting from zero here.  There are all sorts of solutions to prevent this, mostly of which involve some sort of captcha.  But I'm doing this for fun, so why not have some fun with it.

So, the first trick I tried, which worked for at least 50-70% of the spam this contact form got, was a honeypot input.  It simply just is a hidden input form.  If filled, it rejects the message, with a nice spam message. Surprisingly that cut my spam in half.  Now it went from a ton, to a ton, with a hint of less.


Read other posts in the Programming category:

Programming posts

Read other posts:


Stay notified of new posts

Get an email once a month if there were posts that month


RSS Feed

Copyright © 2024 Johnathan Nader