title: SSL error curl php
body: <p>I'm trying to get a website content using curl in PHP.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>$sslVersion = 1;
  $ch = curl_init();
  
  //set the url, number of POST vars, POST data
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_SSLVERSION, $sslVersion);
  
  //execute post
  $response = curl_exec($ch);
  
  //response
  echo 'Error: ' . curl_error($ch);
  echo PHP_EOL;
  
  //response
  echo 'Response: ';
  var_dump($response);
  echo PHP_EOL;
  
  curl_close($ch);
  </code></pre>
  
  <p>If I have my SSL version set to 1 I get:</p>
  
  <pre><code>Error: error:140773E8:SSL routines:SSL23_GET_SERVER_HELLO:reason(1000)
  Response: bool(false)
  </code></pre>
  
  <p>If it's 2 I have:</p>
  
  <pre><code>Error: OpenSSL was built without SSLv2 support
  Response: bool(false)
  </code></pre>
  
  <p>And if it's 3 this happens:</p>
  
  <pre><code>Error: Empty reply from server
  Response: bool(false)
  </code></pre>
  
  <p>Thanks for the help.</p>