Retired Bill
08-20-2007, 06:17 PM
I have a few spammers to my site that always start their message in the comment section with the words Hi, or Hello, or Greetings. I am trying to discourage them from visiting my site by rejecting their message and requiring them to reenter the comment. I am using the following code, but it seems to be ineffective. It detects words such as "history" and "this" as matching "hi."
#display a message and redisplay the form if message appears to be spam
elseif( eregi('((hi)|(hello)|(greetings))', $comments))
{
$msg = "<b>ERROR in submitting data!.</b><br /><br />";
$msg.= $form;
}
Any thoughts or suggestions? I'm kind of new to this. Thanks.
#display a message and redisplay the form if message appears to be spam
elseif( eregi('((hi)|(hello)|(greetings))', $comments))
{
$msg = "<b>ERROR in submitting data!.</b><br /><br />";
$msg.= $form;
}
Any thoughts or suggestions? I'm kind of new to this. Thanks.