Retrieving secured pages with curl
<p>I scrape a few pages from google.. and one of the pages returns me this:</p>

<pre><code>   File : C:\xampp\htdocs\PPC-Advert-System\Scrapper\ScrapperDBCRUD.php

Line: 29

SSL certificate problem, verify that the CA cert is OK. Details:\nerror:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
</code></pre>

<p>This is my curl code:</p>

<pre><code>    private  function getPage($proxy, $url, $referer, $agent, $header, $timeout) {
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        //curl_setopt($ch, CURLOPT_HEADER, $header);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_PROXY, $proxy);
        curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
         // curl_setopt($ch, CURLOPT_REFERER, $referer);
        //  curl_setopt($ch, CURLOPT_USERAGENT, $agent);
        $result['EXE'] = curl_exec($ch);
        $result['INF'] = curl_getinfo($ch);
        $result['ERR'] = curl_error($ch);
        if(curl_exec($ch) === false)
        {
            $result['ERR']=curl_error($ch);
        }
        curl_close($ch);
        return $result;
 }
</code></pre>

<p>I dont know what to add to the curl so it somehow verifies with the page I am trying to scrape. And also, I dont know if it may effect the scraping of ordinary pages that I scrape..whats the best way to cope with the issue?!?</p>

<p>I also get this error sometimes:</p>

<pre><code>error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
</code></pre>

<p>Do both of those errors relate?</p>
