您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

PHP使用CURL 代理问题

2025/6/3 1:11:24发布21次查看
socks5 - php使用curl 代理问题用一个socket5的代理访问谷歌,命令行模式下可以的,但是php代码就是不行,直接返回false
代码贴出来了,求大神帮我捋捋吧
代理字符串写成 tcp://127.0.0.1:1080试试,
$ch = curl_init();         curl_setopt($ch, curlopt_url, $url);         curl_setopt($ch, curlopt_followlocation, 1);         curl_setopt($ch, curlopt_returntransfer, 1);         curl_setopt($ch, curlopt_connecttimeout, 3);         curl_setopt($ch, curlopt_ssl_verifypeer, false);         curl_setopt($ch, curlopt_ssl_verifyhost, false);         if ($this->proxy) {             curl_setopt($ch, curlopt_proxy, $this->proxy);         }
上面是我弄google的时候的配置,正常用。
以上就是socks5 - php使用curl 代理问题的内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product