Function __global->cms_gethostbyname

Definitions

sources/global3.php

  • Get the IP address corresponding to a given Internet host name. Wrapper around gethostbyname.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$hostname string No No required parameter N/A N/A Host name

Returns

  • IP address OR host name if failed to look up
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get the IP address corresponding to a given Internet host name. Wrapper around gethostbyname.
 *
 * @param  string $hostname Host name
 * @return string IP address OR host name if failed to look up
 */

function cms_gethostbyname(string $hostname) : string