Returns the host with the protocol

@return string
325455
public function getHostURI()
    {
        $protIndex = strpos( $this->protocol, '-' );
        $protocol = substr( $this->protocol, 0, $protIndex );
        $hostUri = $protocol.'://'.$this->host;

        return $hostUri;
    }
478471
public function getHost()
    {
        if ($this->host === null) {
            // pick a "random" host
            $host = $this->hosts[mt_rand(0,count($this->hosts)-1)];
            $this->setHost($host);
            return $host;
        } else {
            return $this->host;
        }
    }
96052
public static function getProtocol() {
    if(null === self::$protocol) {
      self::$protocol = @trim($_SERVER['SERVER_PROTOCOL']);
      if(!self::$protocol) {
        self::$protocol = 'HTTP/1.0';
      }
    }
    return self::$protocol;
  }
1041685
public function getHostName()
    {
        $possibleHostSources = ['HTTP_X_FORWARDED_HOST', 'HTTP_HOST', 'SERVER_NAME', 'SERVER_ADDR'];
        $sourceTransformations = [
            "HTTP_X_FORWARDED_HOST" => function ($value) {
                $elements = explode(',', $value);
                return trim(end($elements));
            },
        ];
        $host = '';
        foreach ($possibleHostSources as $source) {
            if (!empty($host)) {
                break;
            }

            if (empty($_SERVER[$source])) {
                continue;
            }

            $host = $_SERVER[$source];
            if (array_key_exists($source, $sourceTransformations)) {
                $host = $sourceTransformations[$source]($host);
            }
        }

        // Remove port number from host
        $host = preg_replace('/:\d+$/', '', $host);

        return trim($host);
    }
1079302
public static function current()
    {
        $protocol = (!empty($_SERVER['HTTPS'])
            && $_SERVER['HTTPS'] !== 'off'
            || $_SERVER['SERVER_PORT'] === 443) ? 'https://' : 'http://';

        if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
            $host = $_SERVER['HTTP_X_FORWARDED_HOST'];
        } else {
            $host = $_SERVER['HTTP_HOST'];
        }

        return $protocol . $host . $_SERVER['REQUEST_URI'];
    }
100998
private function getRemoteHostname()
    {
        $hostname = NULL;

        if(!is_null($this->ip)) {
            $hostname = gethostbyaddr($this->ip);
        }
        return $hostname;
    }
345703
public function getRemoteHostname() {
        static $hostname = null;
        if (!$hostname) {
            /** @var string $hostname */
            $hostname = NetTools::getHostByAddress($this->getRemoteAddress());
        }
        return $hostname;
    }
27473
public static function getHost() : string
  {
      // Check for proxy first
      $host = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ?
          last(explode(',', $_SERVER['HTTP_X_FORWARDED_HOST'])) : 
          $_SERVER['HTTP_HOST'] ?? 
          $_SERVER['HTTP_SERVER_NAME'] ?? 
          $_SERVER['HTTP_SERVER_ADDR'];

      // trim and remove port number from host
      // host is lowercase as per RFC 952/2181
      return strtolower(preg_replace('/:\d+$/', '', trim($host)));
  }
1196530
private function getGroupHost() : string
    {
        $host = '';

        foreach ($this->groupOptionsStack as $groupOptions) {
            if (isset($groupOptions['host'])) {
                $host = $groupOptions['host'] . $host;
            }
        }

        return $host;
    }
970304
public function getDomain()
    {
        if($this->getScheme() && $this->getHost()) {
            return $this->getScheme() . '://' . $this->getHost();
        }

        return false;
    }
1238525
public static function GetCurrentProtocol () {
		$https_flag = (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') || (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off');
		return $https_flag ? 'https' : 'http';
	}
340050
public function getHost()
    {
        if ($this->initialized) {
            $hostname = $this->getHostName();

            if (($this->secure && $this->port != self::HTTPS_PORT) ||
                 (!$this->secure && $this->port != self::HTTP_PORT)) {
                $hostname .= ':'.$this->port;
            }

            return $hostname;
        }

        throw new BadMethodCallException('Connection not initialized');
    }
175155
public static function getDomain()
	{
		if (!isset(self::$RCACHE)) static::cacheReqData();

		//decide if tld needs to be joined
		if (self::$RCACHE['numParts'] > 1) {
			return self::$RCACHE['hostParts'][1] . '.' . static::getTld();
		} else {
			return self::$RCACHE['hostParts'][0];
		}
	}
183544
public static function protocolHostPort()
    {
        if (RequestHelper::isCli()) {
            return null;
        }

        $isHttps = RequestHelper::isHttps();
        $protocol = 'http' . ($isHttps ? 's' : '');
        $serverName = $_SERVER['SERVER_NAME'];
        $serverPort = (int)$_SERVER['SERVER_PORT'];

        $protocolHostPort = $protocol . '://';

        if ((!$isHttps && $serverPort !== 80) || ($isHttps && $serverPort !== 443)) {
            $protocolHostPort .= $serverName . ':' . $serverPort;
        } else {
            $protocolHostPort .= $serverName;
        }

        return $protocolHostPort;
    }
960377
public static function getCurrentUrl()
    {
        if (isset($_SERVER['HTTPS']) &&
            ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) ||
            isset($_SERVER['HTTP_X_FORWARDED_PROTO']) &&
            $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
            $protocol = 'https';
        }
        else {
            $protocol = 'http';
        }

        return "$protocol://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
    }
1196912
public function getMinHost()
    {
        if ($this->network_size === 32 || $this->network_size === 31) {
            return $this->ip;
        }
        return $this->minHostCalculation(self::FORMAT_QUADS, '.');
    }
155630
public function getMinHost()
    {
        if ($this->network_size === 32 || $this->network_size === 31) {
            return $this->ip_address;
        }
        return $this->minHostCalculation(self::FORMAT_QUADS, '.');
    }