Pike v8.0 release 1738

Method Protocols.DNS.client()->gethostbyname()


Method gethostbyname

array gethostbyname(string hostname)

Description

Queries the host name from the default or given DNS server. The result is an array with three elements,

Returns

An array with the requested information about the specified host.

Array
string hostname

Hostname.

array(string) ip

IP number(s).

array(string) aliases

DNS name(s).

Note

Prior to Pike 7.7 this function only returned IPv4 addresses.