0
只有一个问题。我得到一个基于cURL的代码,它发送一个请求到serwer,然后如果响应是'有效的'它是在做一个sql查询,但是如果响应'忙',我需要更改脚本正在使用的代理。CURL响应的数据更改PHP
我做这样说:
$proxys = file('http_proxy.txt');
...then...
for($n = 0, $count = count($proxys); $n <= $count; $n++) {
...and to change the proxy I used something like this:
$proxy = $proxys[$n + 1];
,但它不工作。
有什么建议吗?
问候。
既然你已经有一个'for',在'$代理= $ proxys [$ N + 1]循环他们。 '应该是多余的 - 你应该写下来,以便你可以['继续;](http://php.net/manual/en/control-structures.continue.php)代替... – DaveRandom