I have a form I continue to build on, so that I can keep spam from being sent through. So far, pretty good – in that the only thing now still getting through are single groups of random letters. I have code that kills a send if there are three or more multiple capitals, but would prefer code that either dies on only one nonsense word OR dies if there is no space between at least three words.
This stops the send if there are 3 or more capitals in a row in my Comments:
if(preg_match('/[A-Z]{3}w+/m',$comments)) {
$error_message .= "Weird CAPs in the Message.<br />";
}
I guess my problem is I know how to “sort of” write inclusive statements (if X is true) but don’t know how to do exclusions. Two different examples for instance; if there is only one series of letters entered in the form OR if there is no space between instances of letters, throw an error.
The spam I still get is usually like this: “gfgfdgfRTvdfwsvGFDgfd” – one nonsense bunch. Of course with my luck someone will need to use a 3 cap letter name… USA or STP or NRA.
The spam shows/comes into the Name field and/or the Comments field.
Hope I am clear – thanks.
1