How to use gethostbynamel() function to get the IPv4 address from a given Internet host name in PHP

1 Answer

0 votes
$host = gethostbynamel('cprogramming.bootzlabs.com');

echo "<pre>";
print_r($host);
echo "</pre>";
    
/*
run: 

Array
(
    [0] => 50.31.98.166
)

*/

 



answered May 7, 2016 by avibootz
...