【发布时间】:2016-08-15 06:34:35
【问题描述】:
我使用云服务器 Ubuntu 12.04 作为 tor 代理服务器来进行报废。我现在面临的问题是显示错误
HTTP/1.0 501 Tor 不是 HTTP 代理 Content-Type: text/html; charset=iso-8859-1
$url = 'http://whatismyipaddress.com';
$agent= 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)';
$ch = curl_init('http://whatismyipaddress.com');
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt($ch, CURLOPT_PROXY, 'https://127.0.01:9050/');
curl_exec($ch);
curl_close($ch);
$result=curl_exec($ch);
需要帮助我缺少的东西。 我已经尝试使用了
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
一个请求正在加载,会话过期没有结果。
【问题讨论】:
标签: curl ubuntu-12.04 tor