(PECL getdns >= 0.10.0)
php_getdns_address_sync — Synchronously retrieve IP addresses given a host name.
This function provides an entry point into the getdns API library to synchronously retrieve IP addresses given a host name. It always returns both IPv4 and IPv6 addresses. This function will use all of the namespaces from the context.
The previously created DNS context that is to be used with this request.
The host name to resolve to an address (note that an IP address is considered invalid).
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.