denoteone Posted September 16, 2010 Share Posted September 16, 2010 I am using the following code. $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $response = curl_exec($ch); curl_close($ch); I was given a .cer file should I set CURLOPT_SSL_VERIFYPEER to TRUE and set the path to the .cer file? Any help would be awesome. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/213578-curl-and-ssl/ Share on other sites More sharing options...
schilly Posted September 16, 2010 Share Posted September 16, 2010 Is the URL https? And is the URL domain your site or someone else's? Quote Link to comment https://forums.phpfreaks.com/topic/213578-curl-and-ssl/#findComment-1111694 Share on other sites More sharing options...
denoteone Posted September 16, 2010 Author Share Posted September 16, 2010 The url is https and it is not my server Quote Link to comment https://forums.phpfreaks.com/topic/213578-curl-and-ssl/#findComment-1111699 Share on other sites More sharing options...
schilly Posted September 16, 2010 Share Posted September 16, 2010 Then I don't think you should need to set that flag. I've never used it for any of the cURL https stuff I've done. Quote Link to comment https://forums.phpfreaks.com/topic/213578-curl-and-ssl/#findComment-1111704 Share on other sites More sharing options...
denoteone Posted September 16, 2010 Author Share Posted September 16, 2010 OK so the server I am connecting to gave me the CA Root certificate I am going to use cURL but don't want to download the certificate when I browse to the page because that will expire. Is there any other way of me connecting via https using the ca certificate? Quote Link to comment https://forums.phpfreaks.com/topic/213578-curl-and-ssl/#findComment-1111762 Share on other sites More sharing options...
schilly Posted September 16, 2010 Share Posted September 16, 2010 I'm not too sure. Quote Link to comment https://forums.phpfreaks.com/topic/213578-curl-and-ssl/#findComment-1111771 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.