curl not working with https

Today i was facing this issue. I had implement rpxnow for open ID on a website a. which used CURL for xml services.

The implementation was working fine on our server. But when client moved teh code to their server it stopped working.

First i checked that CURL is enabled on their server, but CURL was working perfectly fine for urls like “http://www.google.com”. Then i found that the issue was with the “https” sites.

So this is what solved my issue:

Add the below code to your curl options:

curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);

This solved my problem.

Regards,

samsami2u

http://www.avidindiainc.com

2 thoughts on “curl not working with https

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s