SCHEME = 'http'; } public function useHttps() { $this->SCHEME = 'https'; } public function setTimeout($timeout) { if ($timeout > 0) { $this->REQ_TIMEOUT = $timeout; } } public function timeout() { return $this->REQ_TIMEOUT; } public function host() { return self::$HEADER_HOST; } public function buildUrl($uri) { return $this->SCHEME.'://'.self::$SERVER_ADDR.'/'.ltrim($uri, "/"); } public static function getUa($appid = null) { $ua = 'CIPhpSDK/'.self::$VERSION.' ('.php_uname().')'; if ($appid) { $ua .= " User($appid)"; } return $ua; } }