(PECL getdns >= 0.10.0)
php_getdns_hostname_sync — Synchronously retrieve host names given an IP address.
This function provides an entry point into the getdns API library to synchronously retrieve host names given an IPv4 or IPv6 address.
The previously created DNS context that is to be used with this request.
A reference to a dictionary structure containing two names: address_type (whose value is bindata and is either "IPv4" or "IPv6") and address_data (whose value is a binary character string (bindata) representing the address to be resolved).
The extensions dictionary for this request; NULL or 0 (zero) if no extensions.
The dictionary to receive the response. The dictionary always contains at least three names: replies_full (a list containing the DNS response as binary data), replies_tree (a list containing the parsed DNS response data) and status (an int). Note that this argument is passed by reference and any existing value will be overwritten. The response must be freed using php_getdns_dict_destroy().
This function returns an integer response code. GETDNS_RETURN_GOOD indicates successful completion.