getdns Functions
PHP Manual

php_getdns_context_get_upstream_recursive_servers

(PECL getdns >= 0.10.0)

php_getdns_context_get_upstream_recursive_serversGet the list of upstream recursive servers for stub resolvers.

Description

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

This function gets 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.

Parameters

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 should 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) may 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 might 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. 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