| Extracted from Pike v7.8 release 866 at 2016-04-05.

[Top]
System

# Method System.gethostbyname()

Method gethostbyname

  `array(string|array(string)) gethostbyname(string hostname)`

Description

  Returns an array with information about the specified host.

Returns

  The returned array contains the following:

  Array
  `string hostname` | Name of the host.
  `array(string) ips` | Array of IP numbers for the host.
  `array(string) aliases` | Array of alternative names for the host.

Note

  This function only exists on systems that have the gethostbyname(2) or similar system call.

See also

  gethostbyaddr()