getdns Functions
PHP Manual


(PECL getdns >= 0.10.0)

php_getdns_context_get_dns_root_serversGet DNS root servers for recursive resolvers.


int php_getdns_context_get_dns_root_servers ( int $context , int &$value )

This function gets the list of DNS root servers that are being used for recursive resolution.



The previously created DNS context that is to be used with this request.


The list that will contain dictionaries of addresses being used for looking up top-level domains; the default is the list of "normal" IANA root servers. Each dictionary in the list will contain at least two names: address_type (whose value is a bindata; currently either "IPv4" or "IPv6") and address_data (whose value is a bindata). Note that this argument is passed by reference and any existing value will be overwritten.

Return Values

This function returns an integer response code. GETDNS_RETURN_GOOD indicates successful completion.

getdns Functions
PHP Manual