/** * @param string $url * * @return Response */ protected function doGet($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, false); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_HTTPHEADER, $this->getHttpHeader()); curl_setopt($ch, CURLOPT_COOKIEJAR, $this->configuration->getCookieFilePath()); curl_setopt($ch, CURLOPT_COOKIEFILE, $this->configuration->getCookieFilePath()); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->configuration->getConnectionTimeout()); $response = new Response(utf8_decode(curl_exec($ch)), curl_getinfo($ch, CURLINFO_HTTP_CODE), curl_error($ch)); curl_close($ch); return $response; }