English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The gethostbynamel() function retrieves the list of IPv4 addresses corresponding to the Internet hostname.
array gethostbynamel ( string $hostname )
It is used to obtain the list of IPV4 addresses specified by the hostname
Returns an array of IPv4 addresses, or FALSE if hostname cannot be resolved.
Serial number | Parameters and descriptions |
---|---|
1 | hostname Hostname |
Try the following example
<?php $hosts = gethostbynamel('ru.oldtoolbag.com'); print_r($hosts); ?>
The above example gives the following result
Array ( [0] => 39.107.75.220 )