English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The gethostbynamel() function retrieves the IPv corresponding to the internet hostname4 List of addresses.
array gethostbynamel ( string $hostname )
It is used to obtain the IPv of the host specified by the hostname4List of addresses
Returns IPv4 Array of addresses, or FALSE is returned when hostname cannot be resolved.
Number | Parameters and Description |
---|---|
1 | hostname Hostname |
Try the following example
<?php $hosts = gethostbynamel('www.oldtoolbag.com'); print_r($hosts); ?>
The following results are given by the example above
Array ( [0] => 39.107.75.220)