我找到袜子并检查袜子,并在下面编码:
$url = 'http://example.com';
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_PROXY, "76.8.6.203:37639");
//curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
curl_setopt ($ch, CURLOPT_PROXYTYPE, 7);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt ($ch, CURLOPT_FAILONERROR, true);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
$data = curl_exec($ch);
curl_close ($ch);
echo $data;
虽然我使用CURLOPT_PROXYTYPE是7或CURLPROXY_SOCKS5然后错误502!谢谢,请帮助我!