title: cURL and SSL, connect() time out
body: <p>I'm using cURL to connect to a SSL server to recive and send XML-files but I keep getting </p>
  
  <blockquote>
    <p>"connect() time out!" </p>
  </blockquote>
  
  <p>when I try to connect to the server.</p>
  
  <p>I'm kind of new to cURL so I don't know if it's something wrong with the servers configuration, some certificate, or what.</p>
  
  <p>The code i'm trying to run (given to me by the owner of the SSL server):</p>
  
  <pre><code>function post($url, $post)
  {
      $ch = curl_init();
      if($ch)
      {
          curl_setopt($ch, CURLOPT_URL, $url);
          curl_setopt($ch, CURLOPT_TIMEOUT,60);
          curl_setopt($ch, CURLOPT_VERBOSE,0);
          curl_setopt($ch, CURLOPT_POST, 1);
          curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
          curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
          curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
          curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
          $result = curl_exec($ch);
          echo '&lt;pre&gt;', curl_error($ch);
          curl_close($ch);
          if(!empty($result))
              return $result;
      }
  }
  </code></pre>
  
  <p>cURL version information:</p>
  
  <pre><code>[version_number] =&gt; 463362
  [age] =&gt; 3
  [features] =&gt; 1597
  [ssl_version_number] =&gt; 0
  [version] =&gt; 7.18.2
  [host] =&gt; i486-pc-linux-gnu
  [ssl_version] =&gt; OpenSSL/0.9.8g
  [libz_version] =&gt; 1.2.3.3
  [protocols] =&gt; Array
      (
          [0] =&gt; tftp
          [1] =&gt; ftp
          [2] =&gt; telnet
          [3] =&gt; dict
          [4] =&gt; ldap
          [5] =&gt; ldaps
          [6] =&gt; http
          [7] =&gt; file
          [8] =&gt; https
          [9] =&gt; ftps
          [10] =&gt; scp
          [11] =&gt; sftp
      )
  </code></pre>