I'm getting a strange error in PHP while trying to use CURL:
What causes this error? I'm connecting to paypal and trying to create a gateway.Code:Error2 [60]: error setting certificate verify locations: CAfile: /usr/local/share/curl/curl-ca-bundle.crt CApath: none
DirkFirst Tutorials | Linux Forum
The problem is you are connecting to a secure site, you need to add some SSL constants to your curl code
hmm, how do I add SSL to CURL?
DirkFirst Tutorials | Linux Forum
untested...Code:<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.paypal.com");
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$returned = curl_exec($ch);
curl_close($ch);
echo $returned;
?>
I tweaked this a little bit and it worked. Thank you for your help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks