代码贴出来了,求大神帮我捋捋吧
代理字符串写成 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 代理问题的内容。