src/LdapTools/Utilities/LdapUtilities.php
public static function getLdapServersForDomain($domain)
    {
        $hosts = (new Dns())->getRecord(self::SRV_PREFIX.$domain, DNS_SRV);

        return is_array($hosts) ? array_column($hosts, 'target') : [];
    }
public static function getLdapServersForDomain($domain)
    {
        $hosts = (new Dns())->getRecord(self::SRV_PREFIX.$domain, DNS_SRV);

        return is_array($hosts) ? array_column($hosts, 'target') : [];
    }
public static function getLdapServersForDomain ( $ domain ) { $ hosts = ( new Dns ( ) ) -> getRecord ( self :: SRV_PREFIX . $ domain , DNS_SRV ) ; return is_array ( $ hosts ) ? array_column ( $ hosts , 'target' ) : [ ] ; }
Get an array of all the LDAP servers for a domain by querying DNS.

@param string $domain The domain name to query.
@return string[]
Get an array of all the LDAP servers for a domain by querying DNS .