The gethostbynamel() function is an inbuilt function in PHP which returns a list of IPv4 address for a specified internet host/domain name.
gethostbynamel( string $hostname )
Parameters: This function accepts single parameter $hostname which is required. It specifies the hostname whose IPv4 address list to be found.
Return Value: This function returns the list of IPv4 address of the specified host/domain name on success or FALSE on failure.
Note: This function is available for PHP 4.0.0 and newer version.
Below program illustrates the gethostbynamel() function in PHP:
Array (  => 22.214.171.124 )
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.