One, command line:
curl -x IP:PORT -k 'https://SITE'
Result: Curl: (+) Proxy CONNECT aborted
Second, PHP code
$ip = "IP:PORT";$url = "https://SITE";$ch = curl_init($url);curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);curl_setopt($ch, CURLOPT_PROXY, $ip);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);$output = curl_exec($ch);var_dump($output);
Result: Boolean (FALSE)
RT, this problem makes me a good headache, the site did not search the information, ask what the way to achieve my needs?
Reply content:
One, command line:
curl -x IP:PORT -k 'https://SITE'
Result: Curl: (+) Proxy CONNECT aborted
Second, PHP code
$ip = "IP:PORT";$url = "https://SITE";$ch = curl_init($url);curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);curl_setopt($ch, CURLOPT_PROXY, $ip);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);$output = curl_exec($ch);var_dump($output);
Result: Boolean (FALSE)
RT, this problem makes me a good headache, the site did not search the information, ask what the way to achieve my needs?
Refer to so on the methods provided in these two articles
Curl-https-through-a-proxy
Linux-curl-command-with-proxy
Install a proxychains, if it is not light, you can use Ss+arm-tor