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

gethostbyname

Description

The gethostbyname of Network for PHP get the IPv4 address corresponding to a given Internet host name.

Syntax

gethostbyname(
    string $hostname
): string

Parameters

hostname

The host name.

Return

Returns the IPv4 address or a string containing the unmodified hostname on failure.

Examples

1 · hostname

<?

$hostname = 'php.net';

$return = gethostbyname($hostname);

echo $return;
185.85.0.29
HomeMenu