Get a list of IPv4 addresses corresponding to a given Internet host name in PHP
Description
The following code shows how to get a list of IPv4 addresses corresponding to a given Internet host name.
Example
/*w w w . j av a2s . c om*/
//gethostbynamel() example
<?php
$hosts = gethostbynamel('www.example.com');
print_r($hosts);
?>
The code above generates the following result.