in reply to Re: form submission with LWP::UA using proxies
in thread form submission with LWP::UA using proxies
use LWP::UserAgent; $ua = new LWP::UserAgent; $ua->proxy('http',"http://".$proxy); $ua->timeout(5); $req = new HTTP::Request POST => 'http://any.com/cgi-bin/any.pl'; $req->content('name=value'); $res = $ua->request($req); if(substr($res->status_line(),0,3) eq "500") { #set longer timeout and retry submition or jump to next proxy } else {...
|
|---|