Forum Moderators: phranque
The form is just a simple PHP script that takes the content of the form and emails an HTML message to whoever is supposed to get it. I know I could create one of those image maps where you have to type the letters in before it will allow you to send the form, but that is a pretty complex task from what I have seen. I was hoping for a more simple solution. Does anyone have any ideas of how I can stop or at least slow this spamming down?
I know I could create one of those image maps where you have to type the letters in before it will allow you to send the form . . .
This is called a captcha, and the real problem is it complicates it for legitimate requests.
I've done a lot of spam-stopping, mostly by cleaning input, allowing only what's expected, etc. - this is a good approach.
But the simplest thing I found? Don't use a static form as the initial page. Dynamically generate the form from your script and set a cookie. On submit, read the cookie value and if it doesn't exist, exit.
Only a browser can read and send a cookie (that I know of.) I had some particularly persistent buggers a few weeks ago, their input never got put in an email but it was annoying nonetheless (kept filling up my log.) Once I set a cookie they stopped even trying.