public function lookup($domain)
    {
        $result = $this->queryServer($domain);

        while (preg_match_all('/.*Whois Server: (.*)/', $result, $matches)) {
            $server = array_pop($matches[1]);

            if ($server) {
                $result = $this->queryServer($domain, $server);
            }
        }

        return $result;
    }
public function lookup($domain)
    {
        $result = $this->queryServer($domain);

        while (preg_match_all('/.*Whois Server: (.*)/', $result, $matches)) {
            $server = array_pop($matches[1]);

            if ($server) {
                $result = $this->queryServer($domain, $server);
            }
        }

        return $result;
    }
public function lookup ( $ domain ) { $ result = $ this -> queryServer ( $ domain ) ; while ( preg_match_all ( '/.*Whois Server: (.*)/' , $ result , $ matches ) ) { $ server = array_pop ( $ matches [ 1 ] ) ; if ( $ server ) { $ result = $ this -> queryServer ( $ domain , $ server ) ; } } return $ result ; }
Recursively lookups up a domain name.

@param string $domain

@return string

@throws UnknownTldException
Recursively lookups up a domain name .