Http代理连接https网站php

时间:2017-11-09 12:02:48

标签: php curl proxy

是否可以使用http代理(不支持https)连接到https网站?

我知道这些数据并不安全,但无论如何都有可能吗?

我使用以下代码,它适用于http://website.com但不适用于https://website.com

$proxy = "proxy which doesn't support https"
$url = "https://website.com" //https url
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_PROXY,$proxy); 
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

 $data = curl_exec($ch);

当我尝试连接到HTTP网站Received HTTP code 403 from proxy after CONNECT

时,Curl会引发以下错误

0 个答案:

没有答案