Jump to content

Please help with my spam issue


EchoFool

Recommended Posts

Hey

 

My site is getting alot of spam and i need a way to keep up with what is being sent with some kinda system that will flag things which contain urls and chosen keywords.

 

Problem i faced though was lets say a keyword was:

 

skyspider

 

Now some one could say sky or spider (as seperate words) but they still flagged. So "theres a spider in the sky" would be flagged when i only want "skyspider" flagged... does that make sense?

 

What php function do i require to do such string checks like this?

 

 

Thanks

Link to comment
Share on other sites

Sos thought i added the script to my post:

 

function Filter($text) {
   // fill this array with the bad words you want to flag on
     $bads = array ("badword1","badword2");


                          

       // we are just checking
      $i = 0;
       while($i < sizeof($bads))
          {
       // go through each bad word
        if(eregi($bads[$i],$text)){ return 1; echo 'flag'; }Else{ return 0; echo 'no flag'; } //if we find any, return 1
        $i++;
      }  
   }   

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.