in reply to Re^2: Proxy link rotation
in thread [Resolved]Proxy link rotation

I don't quite know what you're saying -- I cannot relate everything to the code you're posted. For instance, now you're talking about $cur_proxy[$j], as if @cur_proxy is an array, but in your original code, $cur_proxy is a string.

Let me ask it again, can you provide us with a small, standalone piece of code that shows the errorneous behaviour?

Replies are listed 'Best First'.
Re^4: Proxy link rotation
by kazak (Beadle) on Jan 28, 2012 at 08:50 UTC
     $ua->proxy(['http'], $cur_proxy);

    It's here, $cur_proxy should be a string looking like this: http://111.111.111.111:12345/, randomly chosen from array . If I use $cur_proxy, this string is ignored, and traffic goes directly without any proxification. But if I comment out:

    my $cur_proxy = $valid_routes[$j]; $ua->proxy(['http'], $cur_proxy);

    and rewrite it like this:

     $ua->proxy(['http'], 'http://111.111.111.111:12345/')

    traffic goes through a proxy, as it should. So I need to make rotation work, somehow.

      Ok, I've asked you a few times to provide us with standalone code that shows the problem.

      You're failing to do so.

      Good luck with your program!