(PECL getdns >= 0.10.0)
php_getdns_context_set_timeout — Set the timeout value for DNS queries.
$context
, string $value
)This function can be used to set the number of milliseconds for the getdns library to wait for requests to return.
context
The previously created DNS context that is to be used with this request.
value
The number of milliseconds for the getdns library to wait for requests to return. The default is not specified.
The getdns library uses an unsigned 64-bit integer to represent the timeout value. PHP does not have native support for unsigned 64-bit integers, so a character string representation of the value in hexadecimal format is used to pass the value between PHP user space and getdns. For example, "2710" is used to represent 10,000 milliseconds. The character string must contain no more than 16 characters. Padding with leading zeros (0) is acceptable.
This function returns an integer response code. GETDNS_RETURN_GOOD indicates successful completion.