src/Autodiscover.php
public function trySRVRecord()
    {
        $srvhost = '_autodiscover._tcp.' . $this->tld;
        $lookup = dns_get_record($srvhost, DNS_SRV);
        if (sizeof($lookup) > 0) {
            $host = $lookup[0]['target'];
            $url = 'https://' . $host . self::AUTODISCOVER_PATH;
            if ($this->tryViaUrl($url)) {
                return self::AUTODISCOVERED_VIA_SRV_RECORD;
            }
        }

        return false;
    }
public function trySRVRecord()
    {
        $srvhost = '_autodiscover._tcp.' . $this->tld;
        $lookup = dns_get_record($srvhost, DNS_SRV);
        if (sizeof($lookup) > 0) {
            $host = $lookup[0]['target'];
            $url = 'https://' . $host . self::AUTODISCOVER_PATH;
            if ($this->tryViaUrl($url)) {
                return self::AUTODISCOVERED_VIA_SRV_RECORD;
            }
        }

        return false;
    }
public function trySRVRecord ( ) { $ srvhost = '_autodiscover._tcp.' . $ this -> tld ; $ lookup = dns_get_record ( $ srvhost , DNS_SRV ) ; if ( sizeof ( $ lookup ) > 0 ) { $ host = $ lookup [ 0 ] [ 'target' ] ; $ url = 'https://' . $ host . self :: AUTODISCOVER_PATH ; if ( $ this -> tryViaUrl ( $ url ) ) { return self :: AUTODISCOVERED_VIA_SRV_RECORD ; } } return false ; }
Attempt to retrieve the autodiscover host from an SRV DNS record.

@link http://support.microsoft.com/kb/940881

@return integer|boolean
The value of self::AUTODISCOVERED_VIA_SRV_RECORD or false.
Attempt to retrieve the autodiscover host from an SRV DNS record .