getdns Functions
PHP Manual

php_getdns_context_set_resolution_type

(PECL getdns >= 0.10.0)

php_getdns_context_set_resolution_typeSet the DNS query resolution type.

Description

int php_getdns_context_set_resolution_type ( int $context , int $value )

This function determines if DNS queries are performed with nonrecursive lookups or as a stub resolver. All implementations of this getdns library can act as recursive resolvers, and that is the default mode of the default context. Some implementations of the library are expected to also be able to act as stub resolvers.

Parameters

context

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

value

The value to be set. It must be either GETDNS_RESOLUTION_RECURSING or GETDNS_RESOLUTION_STUB.

Return Values

This function returns an integer response code. GETDNS_RETURN_GOOD indicates successful completion. If an implementation of the library is only able to act as a recursive resolver, a call to php_getdns_context_set_resolution_type($context, GETDNS_RESOLUTION_STUB) will return GETDNS_RETURN_CONTEXT_UPDATE_FAIL.


getdns Functions
PHP Manual