How to block words?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to block words?

    How to block some words at register page? I dont want sm user register with any site name, example: google.com, how i can block these words at registration page? I want code for indifun script

    #2
    If($sitename=$uid)
    {
    echo"bla bla bla"
    }
    PHP Code:
    /* I don't know everything hehe */ 
    
    Find me on facebook

    Comment


      #3
      you may look at reg name if it pattern matches url. maybe by doing check for dot in un
      Follow me @ksg91 | My Blog: http://ksg91.com | Nokia Blog: http://NokiaTips.in

      Comment


        #4
        PHP Code:
        ///function
            function check($string){
            $words = array(
                            //    'banned words/links blaaaa',
                                'google.ro',
                                'yahoo.ro'
                            );
        
        
                foreach ($words as $word) {
                    if (strstr($string, $word)) {
                        return true;
                    }
                }
                return false;
        
            }
        
        ////////USAGE :
        
        $string='bla googdro 2';
        
            if(check($string)){
        
            echo"you cant use such words ";
        
            }
            else {
            echo"ok?!";} 
        
        Unamos los corazones,hoy todos somos multicolores!

        Comment


          #5
          Thanks 4 help frnds

          Comment

          Working...
          X