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
https://forums.phpfreaks.com/topic/215389-please-help-with-my-spam-issue/
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++;
      }  
   }   

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.