To work with a SSL connections you have to enable the php_openssl.dll
in your php.ini
And when you work with curl a common problem is that the openssl module work with a wrong SSL version as default. Most times you should set the SSL version to 3.
curl_setopt($curl, CURLOPT_SSLVERSION,3);
I had the same problem before a few days.