Check if connected through https
@return bool
172476
public static function is_https()
    {
        if (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') {
            return TRUE;
        } elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
            return TRUE;
        } elseif (!empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off') {
            return TRUE;
        }
        return FALSE;
    }
717335
public static function isSecure() {
        $s = &$_SERVER;
        $ssl = (!empty($s['HTTPS']) && $s['HTTPS'] == 'on') ? true : false;
        return $ssl;
    }
1203967
public function ping() {

		$canConnect = false;

		foreach ( $this->httpRequests as $httpRequest ) {
			if ( !$httpRequest->ping() ) {
				return false;
			}

			$canConnect = true;
		}

		return $canConnect;
	}
854980
public function hasDefaultPort(): bool
    {
        if (!$this->parsedUri->hasPort()) {
            return true;
        }

        if ($this->isHttp() && $this->parsedUri->portEquals(Http::PORT)) {
            return true;
        }

        if ($this->isHttps() && $this->parsedUri->portEquals(Http::PORT_SSL)) {
            return true;
        }

        return false;
    }
527173
public function check()
	{
		if($this->cipher === null)
			return false;
		if($this->compression === 0)
			return false;
		if($this->masterSeed === null)
			return false;
		if($this->transformSeed === null)
			return false;
		if($this->rounds === null)
			return false;
		if($this->encryptionIV === null)
			return false;
		if($this->startBytes === null)
			return false;
		if($this->headerHash === null)
			return false;
		if($this->randomStreamKey === null)
			return false;
		if($this->randomStream === 0)
			return false;
		return true;
	}
745835
public function isConnectionClose()
    {
        $connection = $this->getHeader('connection');

        if ($this->protocolVersion === '1.1') {
            return ($connection[0] === 'C' || $connection[0] === 'c');
        } else {
            return ($connection[0] !== 'K' && $connection[0] !== 'k');
        }
    }
1340852
protected function _is_conn()
	{
		if ( ! is_resource($this->_conn_id))
		{
			if ($this->_debug == true)
			{
				throw new \InvalidArgumentException('Invalid connection');
			}
			return false;
		}
		return true;
	}
522721
public function isSecureConnection()
    {
        return isset($_SERVER['HTTPS']) && (strcasecmp($_SERVER['HTTPS'], 'on') === 0 || $_SERVER['HTTPS'] == 1)
        || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strcasecmp($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') === 0;
    }
1151924
public function connect()
    {
        $this->connection = ftp_connect($this->host);
        if (ftp_login($this->connection, $this->username, $this->password)) {
            if (ftp_chdir($this->connection, $this->getChdir()) && ftp_pasv($this->connection, $this->passive)) {
                $this->connected = true;
                return true;
            }
        }
        return false;
    }
1188006
public function check()
    {
        if ($this->_session->has('auth')) {
            // They have an auth, let's attempt to check expiration
            // and master session
            $s = [
                'session' => $this->_session->get('SCARA_SESSION'),
                'token'   => $this->_session->get('SCARA_SESSION_TOKEN'),
            ];

            $ua = $this->_ssl->untokenize($s['token'], $s['session']);

            if ($ua === hash('sha256', $_SERVER['HTTP_USER_AGENT'])) {
                $expire = $this->_session->get('expire');
                if (time() < $expire) {
                    return true;
                } else {
                    $this->logout();
                }
            }
        }

        return false;
    }
73207
public function isConnected()
    {
        return ((bool) (is_resource($this->_connection)
                    && (get_resource_type($this->_connection) == 'oci8 connection'
                     || get_resource_type($this->_connection) == 'oci8 persistent connection')));
    }
724753
public function isSecure()
    {
        return (
            (!empty($this->server['HTTPS']) && $this->server['HTTPS'] != 'off') || 
            (!empty($this->server['HTTP_HTTPS']) && $this->server['HTTP_HTTPS'] != 'off') || 
            $this->server['REQUEST_SCHEME'] == 'https' || $this->server['SERVER_PORT'] == 443
        );
    }
1014551
public function isLoggedIn()
    {
        //If you aren't connected you can't be logged in! ($this->isConnected())
        //We are connected - but are we logged in? (the rest)
        return $this->isConnected() && !empty($this->loginStatus) && $this->loginStatus === Constants::CONNECTED_STATUS;
    }
932834
public function check(): bool
  {
    if ( $this->current !== null ){
      // if $on_error is set to E_CONTINUE returns true
      if ( $this->on_error === self::E_CONTINUE ){
        return true;
      }
      // If any connection has an error with mode E_STOP_ALL
      if ( self::$has_error_all && ($this->on_error !== self::E_STOP_ALL) ){
        return false;
      }
      // If this connection has an error with mode E_STOP
      if ( $this->has_error && ($this->on_error !== self::E_STOP) ){
        return false;
      }
      return true;
    }
    return false;
  }
629382
protected function connectSftp()
    {
        if ( ! $this->connected) return false;

        $this->ftpConnection = ssh2_sftp($this->connection);

        return true;
    }
341579
public function connected()
    {
        if (is_resource($this->smtp_conn)) {
            $sock_status = stream_get_meta_data($this->smtp_conn);
            if ($sock_status['eof']) {
                // the socket is valid but we are not connected
                if ($this->do_debug >= 1) {
                    $this->edebug(
                        'SMTP NOTICE: EOF caught while checking if connected'
                    );
                }
                $this->close();
                return false;
            }
            return true; // everything looks good
        }
        return false;
    }
725356
public static function isHttps($trustProxyHeaders = false): bool
    {
        // Check standard HTTPS header
        if (Arr::key('HTTPS', $_SERVER)) {
            return !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off';
        }

        if ($trustProxyHeaders && Arr::key('X-FORWARDED-PROTO', $_SERVER)) {
            return $_SERVER['X-FORWARDED-PROTO'] === 'https';
        }

        // Default is not SSL
        return false;
    }