wpt394 Posted July 7, 2007 Share Posted July 7, 2007 Greetings all, I'm trying to perform a curl on a "https://" site... I've searched the internet far and wide, and have yet to come up with any solution to my problem. I was hoping someone on here could point me in the right direction. Whenever I try this code.... $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_USERAGENT, $defined_vars['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); $result = curl_exec($ch); echo curl_error($ch); curl_close ($ch); I can never connect. I always get the error: Failed to connect to ... IP number 1: Permission denied Anyone have any ideas for me? Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/58873-sslhttps-curl/ Share on other sites More sharing options...
phpknight Posted July 8, 2007 Share Posted July 8, 2007 I was just doing an internal ssl test an always got an error (but not that one). I finally got it to work by doing this: curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); Link to comment https://forums.phpfreaks.com/topic/58873-sslhttps-curl/#findComment-292647 Share on other sites More sharing options...
wpt394 Posted July 9, 2007 Author Share Posted July 9, 2007 Thanks, but it's still not working...This is an 'external' ssl test, so it seems much more complicated...Any other help would be appreciated. Link to comment https://forums.phpfreaks.com/topic/58873-sslhttps-curl/#findComment-292873 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.