gpt4 book ai didi

php - 如何从 php curl 访问洋葱网站?

转载 作者:搜寻专家 更新时间:2023-10-31 21:36:25 25 4
gpt4 key购买 nike

<分区>

我使用这段代码:

$this->curl = curl_init();
curl_setopt($this->curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
curl_setopt($this->curl, CURLOPT_TIMEOUT, 60);
curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($this->curl, CURLOPT_PROXY, '127.0.0.1:9050');
curl_setopt($this->curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
curl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($this->curl, CURLOPT_URL, "http://some-onion-site.onion");
$contents = curl_exec($this->curl);

它会立即返回任何内容。 Tor 工作正常,可以从 Tor 浏览器访问站点。编辑:我发现它无法解析主机(“无法解析主机名”错误)。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com