PHP cURL SSL Connect Error
<p>I have tried to display content of SSL webpage using file_get_contents() function.</p>

<pre><code>$url = base64_decode("aHR0cHM6Ly93d3cudGVudGtvdHRhLmNvbQ==");
echo file_get_contents($url);

$header = array("Connection: Keep-Alive", "User-Agent: Mozilla/5.0");
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, $header);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_TIMEOUT, 3600);
curl_setopt($ch, CURLOPT_SSLVERSION , 3);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);     
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); 
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
$result = curl_exec($ch);
if($errno = curl_errno($ch)) {
    $error_message = curl_strerror($errno);
    echo "cURL error ({$errno}):\n {$error_message}";
}
curl_close($ch);
echo $result;
</code></pre>

<p>But it throws me a warning says,</p>

<pre><code>Warning: file_get_contents(): Failed to enable crypto in
</code></pre>

<p>Then I tried to get using cURL library. But it also gives me an error no 35 which is SSL Connect Error.</p>

<p>I have searched on cURL site and it says error while connecting webpage.</p>

<blockquote>
  <p>CURLE_SSL_CONNECT_ERROR (35)</p>
  
  <p>A problem occurred somewhere in the SSL/TLS handshake. You really want the error buffer and read the message there as it pinpoints the problem slightly more. Could be certificates (file formats, paths, permissions), passwords, and others. </p>
</blockquote>

<p>could you please anyone help me with this.</p>

<p>Thank you.</p>