Code example for curl to support sock5 in PHP, curlsock5
Copy code The code is as follows:
//Recently, curl needs to be used to test whether the proxy is available. The proxy is sock5 and not http, so a few sentences need to be added to curl.
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
curl_setopt($ch, CURLOPT_PROXY, "0.0.0.0:8080");
curl_setopt($ch,CURLOPT_PROXYUSERPWD, "username:pwd");
//The test is ok and the speed is very fast haha
http://www.bkjia.com/PHPjc/945709.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/945709.htmlTechArticleCode example for curl to support sock5 in PHP, curlsock5 copy code code is as follows: //Recently need to use curl testing Is the proxy available? The proxy is sock5 but not http, so it needs to be added to curl...