CA Coins (OP)
Donator
Sr. Member
Offline
Activity: 305
Merit: 250
|
|
July 29, 2012, 08:12:38 AM |
|
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.
|
|
|
|
|
|
"Governments are good at cutting off the heads of a centrally
controlled
networks like Napster, but pure P2P networks like Gnutella and Tor seem
to be holding their own." -- Satoshi
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
|
drakahn
|
|
July 29, 2012, 08:24:15 AM |
|
1MEYHC9c5gmJ4TPWCoFWW9Ey1TGLUjfMKi
Glad you got it worked out
|
14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
|
|
|
BCB
CTG
VIP
Legendary
Offline
Activity: 1078
Merit: 1002
BCJ
|
|
July 29, 2012, 01:01:20 PM |
|
Ahhhh. MS Server requires the Certificate. Linux does not. Good to know. It makes me think that Campbx is also hosted on an MS Server box as you said you could authenticate to the other exchanges but not to Campbx. Glad you got it working!
|
|
|
|
unclemantis
Member
Offline
Activity: 98
Merit: 10
(:firstbits => "1mantis")
|
|
July 29, 2012, 02:03:44 PM |
|
PHP on IIS? UGH! No wonder!
DOOD! Switch to Linux for ANYTHING OPEN SOURCE!
|
|
|
|
scribe
|
|
July 29, 2012, 03:06:06 PM |
|
Try using different SSL versions: curl_setopt($curl, CURLOPT_SSLVERSION,3); // or try setting to 2 Bingo! That did the trick. 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. Awesome - my 'tweak stuff til it does something different' approach works again... PM'd. Now just got to figure out why php on osx hates anything https.
|
|
|
|
unclemantis
Member
Offline
Activity: 98
Merit: 10
(:firstbits => "1mantis")
|
|
July 29, 2012, 03:57:55 PM |
|
Try using different SSL versions: curl_setopt($curl, CURLOPT_SSLVERSION,3); // or try setting to 2 Bingo! That did the trick. 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. Awesome - my 'tweak stuff til it does something different' approach works again... PM'd. Now just got to figure out why php on osx hates anything https. Saint Jobs needs to spy on you. He can't spy on your through https
|
|
|
|
CA Coins (OP)
Donator
Sr. Member
Offline
Activity: 305
Merit: 250
|
|
July 29, 2012, 07:24:50 PM |
|
Yeah, I agree. Linux is a good system and much better for running PHP. I have a few thousand lines of code in classic asp so the migration has been happening slowly but surely.
Thanks again for everybody's help. The bounty and most of the donations have been sent. BCB, I got a 2BTC donation coming your way if you're interested (I don't see an address in your sig).
|
|
|
|
BCB
CTG
VIP
Legendary
Offline
Activity: 1078
Merit: 1002
BCJ
|
|
July 29, 2012, 07:44:57 PM |
|
Yeah, I agree. Linux is a good system and much better for running PHP. I have a few thousand lines of code in classic asp so the migration has been happening slowly but surely.
Thanks again for everybody's help. The bounty and most of the donations have been sent. BCB, I got a 2BTC donation coming your way if you're interested (I don't see an address in your sig).
I appreciate that but I didn't solve the problem. Happy to help you out. Put the 2BTC towards a new linux box! Thanks!
|
|
|
|
CA Coins (OP)
Donator
Sr. Member
Offline
Activity: 305
Merit: 250
|
|
July 29, 2012, 08:14:14 PM |
|
Cool dude. Thanks for your help!
|
|
|
|
scribe
|
|
July 29, 2012, 08:48:44 PM |
|
Thanks for the donation, CA - I'll keep it away from satoshidice I think I do a fair bit of dev work on Windows Server and then deploy to a Linux box, so I'll keep an eye out for this one in future... Now just got to figure out why php on osx hates anything https.
Saint Jobs needs to spy on you. He can't spy on your through https Pretty sure the big bearded dude in the sky could pull a MITM attack if he wanted to. Does God have root?
|
|
|
|
|