private function parseTxt($txt)
    {
        $result = [];
        $lines = array_map('trim', mb_split('\r\n|\n|\r', $txt));
        // Parse each line individually
        foreach ($lines as $key => $line) {
            // Limit rule length
            $line = mb_substr($line, 0, self::MAX_LENGTH_RULE);
            // Remove comments
            $line = explode('#', $line, 2)[0];
            // Parse line
            $result[] = $this->parseLine($line);
            unset($lines[$key]);
        }
        return in_array(true, $result, true);
    }
private function parseTxt($txt)
    {
        $result = [];
        $lines = array_map('trim', mb_split('\r\n|\n|\r', $txt));
        // Parse each line individually
        foreach ($lines as $key => $line) {
            // Limit rule length
            $line = mb_substr($line, 0, self::MAX_LENGTH_RULE);
            // Remove comments
            $line = explode('#', $line, 2)[0];
            // Parse line
            $result[] = $this->parseLine($line);
            unset($lines[$key]);
        }
        return in_array(true, $result, true);
    }
private function parseTxt ( $ txt ) { $ result = [ ] ; $ lines = array_map ( 'trim' , mb_split ( '\r\n|\n|\r' , $ txt ) ) ; // Parse each line individually foreach ( $ lines as $ key => $ line ) { // Limit rule length $ line = mb_substr ( $ line , 0 , self :: MAX_LENGTH_RULE ) ; // Remove comments $ line = explode ( '#' , $ line , 2 ) [ 0 ] ; // Parse line $ result [ ] = $ this -> parseLine ( $ line ) ; unset ( $ lines [ $ key ] ) ; } return in_array ( true , $ result , true ) ; }
Client robots.txt

@param string $txt
@return bool
Client robots . txt