private function commonCurlParams($url, $userAgent)
 {
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_URL, $url);
     curl_setopt($ch, CURLOPT_PORT, 443);
     curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->config->isSslVerify());
     curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
     if (!is_null($this->config->getCabundleFile())) {
         curl_setopt($ch, CURLOPT_CAINFO, $this->config->getCabundleFile());
     }
     if (!empty($userAgent)) {
         curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);
     }
     if ($this->config->getProxyHost() != null && $this->config->getProxyPort() != -1) {
         curl_setopt($ch, CURLOPT_PROXY, $this->config->getProxyHost() . ':' . $this->config->getProxyPort());
     }
     if ($this->config->getProxyUsername() != null && $this->config->getProxyPassword() != null) {
         curl_setopt($ch, CURLOPT_PROXYUSERPWD, $this->config->getProxyUsername() . ':' . $this->config->getProxyPassword());
     }
     return $ch;
 }