$ch = curl_init();
curl_setopt ($ch, CURLOPT_PROXY,'218.66.66.18:80');
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt($ch, CURLOPT_USERAGENT,$_SERVER['HTTP_USER_AGENT']);
curl_setopt ($ch, CURLOPT_URL, 'http://www.baidu.com');
curl_setopt ($ch, CURLOPT_TIMEOUT, 120);
curl_setopt ($ch, CURLOPT_AUTOREFERER,1);
curl_setopt ($ch, CURLOPT_HEADER, 1);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);
dump($result);
//我去掉端口代理就可以访问到百度,加了代理端口为什么不行!是什么方式不对么?这个端口可以用吧!求大神详细解答感谢!
------解决方案--------------------
218.66.66.18:80 是 新华都商学院本科招生网
并不是什么代理服务器,所以 CURLOPT_HTTPPROXYTUNNEL 就无法建立通道