Jump to content

ssl/https curl


wpt394

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.