original_string: public static function getHostname($requestHost = TRUE) {
  		$host = '';
  			// If not called from the command-line, resolve on getIndpEnv()
  			// Note that TYPO3_REQUESTTYPE is not used here as it may not yet be defined
  		if ($requestHost && (!defined('TYPO3_cliMode') || !TYPO3_cliMode)) {
  			$host = self::getIndpEnv('HTTP_HOST');
  		}
  		if (!$host) {
  				// will fail for PHP 4.1 and 4.2
  			$host = @php_uname('n');
  				// 'n' is ignored in broken installations
  			if (strpos($host, ' ')) {
  				$host = '';
  			}
  		}
  			// we have not found a FQDN yet
  		if ($host && strpos($host, '.') === FALSE) {
  			$ip = gethostbyname($host);
  				// we got an IP address
  			if ($ip != $host) {
  				$fqdn = gethostbyaddr($ip);
  				if ($ip != $fqdn) {
  					$host = $fqdn;
  				}
  			}
  		}
  		if (!$host) {
  			$host = 'localhost.localdomain';
  		}
  
  		return $host;
  	}
code: public static function getHostname($requestHost = TRUE) {
  		$host = '';
  			// If not called from the command-line, resolve on getIndpEnv()
  			// Note that TYPO3_REQUESTTYPE is not used here as it may not yet be defined
  		if ($requestHost && (!defined('TYPO3_cliMode') || !TYPO3_cliMode)) {
  			$host = self::getIndpEnv('HTTP_HOST');
  		}
  		if (!$host) {
  				// will fail for PHP 4.1 and 4.2
  			$host = @php_uname('n');
  				// 'n' is ignored in broken installations
  			if (strpos($host, ' ')) {
  				$host = '';
  			}
  		}
  			// we have not found a FQDN yet
  		if ($host && strpos($host, '.') === FALSE) {
  			$ip = gethostbyname($host);
  				// we got an IP address
  			if ($ip != $host) {
  				$fqdn = gethostbyaddr($ip);
  				if ($ip != $fqdn) {
  					$host = $fqdn;
  				}
  			}
  		}
  		if (!$host) {
  			$host = 'localhost.localdomain';
  		}
  
  		return $host;
  	}
code_tokens: public static function getHostname ( $ requestHost = TRUE ) { $ host = '' ; // If not called from the command-line, resolve on getIndpEnv() // Note that TYPO3_REQUESTTYPE is not used here as it may not yet be defined if ( $ requestHost && ( ! defined ( 'TYPO3_cliMode' ) || ! TYPO3_cliMode ) ) { $ host = self :: getIndpEnv ( 'HTTP_HOST' ) ; } if ( ! $ host ) { // will fail for PHP 4.1 and 4.2 $ host = @ php_uname ( 'n' ) ; // 'n' is ignored in broken installations if ( strpos ( $ host , ' ' ) ) { $ host = '' ; } } // we have not found a FQDN yet if ( $ host && strpos ( $ host , '.' ) === FALSE ) { $ ip = gethostbyname ( $ host ) ; // we got an IP address if ( $ ip != $ host ) { $ fqdn = gethostbyaddr ( $ ip ) ; if ( $ ip != $ fqdn ) { $ host = $ fqdn ; } } } if ( ! $ host ) { $ host = 'localhost.localdomain' ; } return $ host ; }
docstring: Get the fully-qualified domain name of the host.
  
  @param boolean $requestHost Use request host (when not in CLI mode).
  @return string The fully-qualified host name.
docstring_tokens: Get the fully - qualified domain name of the host .