PHP Gethostbyname () Function

string gethostbyname ($hostname)
Parameter :This function takes one required parameter, $hostname . It specifies the hostname whose IPv4 address should be found.Return Value:This function returns the IPv4 address on success or a string containing the unchanged hostname on error. Note.This function is available for PHP 4.0.0 and above.The following program illustrates the gethostbyname() function in PHP:Program : $ip = gethostbyname ( "engineerforengineer.org" ); echo $ip ; ?> Output:
Link: https://www.php.net/manual/en/function.gethostbyname.php
Get Solution for free from DataCamp guru