(PECL getdns >= 0.10.0)
php_getdns_context_set_upstream_recursive_servers — Set the list of upstream recursive servers for stub resolvers.
$context
, int $value
)This function sets the list of upstream recursive servers for stub resolvers. An application can change the query mechanism of a context to act as a stub resolver. Such an application might first get the default information to make this change from the operating system, probably through DHCP. Note that if a context is changed to being a stub resolver, this automatically prevents the application from using the extentions for DNSSEC. An application that wants to both do DNSSEC and stub resolution must do its own DNSSEC processing, possibly with the php_getdns_validate_dnssec() function.
context
The previously created DNS context that is to be used with this request.
value
A reference to the list of dictionaries that define where a stub resolver will send queries. Each dictionary must contain at least two names: address_type (whose value is a bindata; it should be either "IPv4" or "IPv6") and address_data (whose value is a bindata). For IPv6 link-local addresses, a scope_id name (a bindata) can be provided. It might also contain a port to specify which port to use to contact these DNS servers; the default is 53. If the stub and a recursive resolver both support TSIG (» RFC 2845) the upstream_list entry can also contain tsig_algorithm (a bindata) that is the name of the TSIG hash algorithm, and tsig_secret (a bindata) that is the TSIG key.
This function returns an integer response code. GETDNS_RETURN_GOOD indicates successful completion.