TeamSpeak3/Node/Host.php
public function serverGetByTSDNS($tsdns)
    {
        $parts = Uri::getFQDNParts($tsdns);
        $query = StringHelper::factory(array_shift($parts));

        while ($part = array_shift($parts)) {
            $query->prepend($part);

            try {
                $port = TeamSpeak3::factory("tsdns://" . $query . "/?timeout=3")->resolve($tsdns)->section(":", 1);

                return $this->serverGetByPort($port == "" ? 9987 : $port);
            } catch (Ts3Exception $e) {
                /* skip "Connection timed out" and "Connection refused" */
                if ($e->getCode() != 10060 && $e->getCode() != 10061) {
                    throw $e;
                }
            }
        }

        throw new Ts3Exception("invalid serverID", 0x400);
    }
public function serverGetByTSDNS($tsdns)
    {
        $parts = Uri::getFQDNParts($tsdns);
        $query = StringHelper::factory(array_shift($parts));

        while ($part = array_shift($parts)) {
            $query->prepend($part);

            try {
                $port = TeamSpeak3::factory("tsdns://" . $query . "/?timeout=3")->resolve($tsdns)->section(":", 1);

                return $this->serverGetByPort($port == "" ? 9987 : $port);
            } catch (Ts3Exception $e) {
                /* skip "Connection timed out" and "Connection refused" */
                if ($e->getCode() != 10060 && $e->getCode() != 10061) {
                    throw $e;
                }
            }
        }

        throw new Ts3Exception("invalid serverID", 0x400);
    }
Returns the first Server object matching the given TSDNS hostname. Like the
TeamSpeak 3 Client, this method will start looking for a TSDNS server on the second-level
domain including a fallback to the third-level domain of the specified $tsdns parameter.

@param  string $tsdns
@throws Ts3Exception
@return Server