getdns Functions
PHP Manual


(PECL getdns >= 0.10.0)

php_getdns_context_set_dns_root_serversSet DNS root servers for recursive resolvers.


int php_getdns_context_set_dns_root_servers ( int $context , int $value )

This function sets the DNS root servers to be used for recursive resolution. The value parameter must be a list that contains dictionaries of addresses to be used for looking up top-level domains; the default is the list of "normal" IANA root servers. Each dictionary in the list must 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).



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


The list that contains the dictionaries that describe the root servers to be set in the context for recursive resolution.

Return Values

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

getdns Functions
PHP Manual