Advertisement
Shad0w

Untitled

Oct 30th, 2011
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. function is_black($string)
  2. {
  3.     $black_list = "טמבל|אידיוט|מפגר";
  4.     $string = urldecode($string);
  5.     if(preg_match("/^($black_list)$/i", $string))
  6.     {
  7.         return 1;
  8.     }
  9.     else
  10.     {
  11.         if(preg_match("/^.&($black_list)&.$/i", $string))
  12.         {
  13.             return 1;
  14.         }
  15.         else
  16.         {
  17.             if(preg_match("/^($black_list)./i", $string))
  18.             {
  19.                 return 1;
  20.             }
  21.             else
  22.             {
  23.                 return 0;
  24.             }
  25.         }
  26.     }
  27. }
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement