HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

gethostbynamel

Description

The gethostbynamel of Network for PHP gets a list of IPv4 addresses corresponding to a given Internet host name.

Syntax

gethostbynamel(
    string $hostname
): array|false

Parameters

hostname

The host name.

Return

Returns an array of IPv4 addresses or false if hostname could not be resolved.

Examples

1 · hostname

<?

$hostname = "php.net";

$return = gethostbynamel($hostname);

print_r($return);
Array
(
    [0] => 185.85.0.29
)