Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
Protocols
Protocols.DNS
Protocols.DNS.client

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.