简体   繁体   English

我们如何使用Curl使用不同的代理端口(不是80)

[英]How can we use different proxy port (other than 80 ) using Curl

I would like to know, how can we use different proxy (other than port 80). 我想知道,我们如何使用其他代理(端口80除外)。 like we have some proxy ip's from 3128,8080,3127,8008,8118 these ports. 就像我们从3128,8080,3127,8008,8118这些端口中获取一些代理IP一样。 but we are unable to use these proxy in using cURL. 但我们无法在使用cURL时使用这些代理。 Please suggest me proper way, in which we can use as many proxies from other ports also. 请建议我正确的方法,在此我们也可以使用来自其他端口的许多代理。 All the ip's from PORT 80 working fine. 来自PORT 80的所有IP正常工作。

Thanks 谢谢

ROD 竿

curl_setopt($ch, CURLOPT_URL, $website);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_PROXY, 111.222.333.444);
curl_setopt($ch, CURLOPT_PROXYPORT, 8080);
curl_setopt ($ch, CURLOPT_HEADER, 1);
$res['content'] = curl_exec($ch);
curl_close ($ch);

we are unable to use this proxyport here. 我们无法在此处使用此代理端口。

有关curl_setopt()函数,请参见CURLOPT_PORTCURLOPT_PROXYPORT属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM