Hello i have a multiple IP and want call website via each IP
my $max_conn = 4;
Mojo::IOLoop->recurring(
0 => sub {
for ($active + 1 .. $max_conn) {
return ($active or Mojo::IOLoop->stop)
unless my $ip = shift @ips;
++$active;
$ua->local_address($ip);
$ua->get('http://myip.ru/?ip='.$ip => \&get_ip);
}
}
);
Output
http://myip.ru/?ip=193.124.18.205 > remote_ip: 193.124.18.205
http://myip.ru/?ip=193.124.44.44 > remote_ip: 193.124.44.44
http://myip.ru/?ip=151.248.125.194 > remote_ip: 151.248.125.194
http://myip.ru/?ip=193.124.16.139 > remote_ip: 193.124.16.139
----- error start here
http://myip.ru/?ip=194.58.61.231 > remote_ip: 193.124.18.205
http://myip.ru/?ip=193.124.44.45 > remote_ip: 193.124.16.139
http://myip.ru/?ip=193.124.18.206 > remote_ip: 151.248.125.194
http://myip.ru/?ip=194.58.61.232 > remote_ip: 193.124.18.205
http://myip.ru/?ip=193.124.16.184 > remote_ip: 193.124.16.139
User agent use a first 4 ip from array for all request , some time use only
2
How i can say $ua use a right ip for request ?
Thanks.
--
С уважением.
Ильиных Денис
Компания "GT-Shop.ru"
Телефон: +7(963) 995-7616
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.