Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2006
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Catching spam messages

    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.

  • #2
    ess
    ess is offline
    Regular Coder
    Join Date
    Oct 2006
    Location
    United Kingdom
    Posts
    865
    Thanks
    7
    Thanked 29 Times in 28 Posts
    I would suggest that you use a CAPTCHA with every form on your website. Here is a url that demonstrates how to use CAPTCHAs
    http://www.white-hat-web-design.co.u...hp-captcha.php

    cheers,
    Ess

  • #3
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,169
    Thanks
    19
    Thanked 65 Times in 64 Posts
    I've had great success just blocking anything with a URL in it, since 100% of the spam I get through web-forms contains a url of some sort... otherwise what would be the point - aside from general annoyance? Then my error page instructs real users to obfuscate urls if they want to send me a link through my contact page.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •