In PHP, let curl support the sock5 code instance, curlsock5. In PHP, let curl support sock5 code instances. curlsock5 copies the code as follows: recently, curl needs to be used to test whether the agent is available, the proxy is sock5 non-http, so you need to add the PHP code instance for curl to support sock5, curlsock5
The code is as follows:
// Recently, you need to use curl to test whether the proxy is available. the proxy is sock5 and non-http. Therefore, you need to add a few additional statements in 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 ");
// Testing OK is fast haha
The signature code is as follows: // recently, curl needs to be used to test whether the proxy is available. the proxy is sock5 and non-http. Therefore, you need to add...