Nope, no errors.
Try using different SSL versions:
curl_setopt($curl, CURLOPT_SSLVERSION,3); // or try setting to 2
Bingo! That did the trick.
If verifyhost set as 1, then also need the line to point to the certificate, but here is a working code.
$params['user'] = "myUser";
$params['pass'] = "myPass";
$postData = http_build_query($params, '', '&');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://CampBX.com/api/myfunds.php");
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
//curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt($ch, CURLOPT_CAINFO, "path to certificate.crt");
//curl_setopt($ch,CURLOPT_POST, true);
//curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC );
curl_setopt($ch, CURLOPT_SSLVERSION,3); // or try setting to 2 //This did the trick
$res = curl_exec($ch);
print_r($res);
echo 'Curl error: ' . curl_error($ch);
curl_close($ch);
Thanks to everybody for your help. scribe, can you please send or post your address for the 5BTC bounty? Also, to BCB, gweedo, unfinishe, and drakahn, please send or post your address so I can send you a small donation for helping out.