Withou loop it works just fine, but when i make loop like this$ua = new LWP::UserAgent; $ua->agent('Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 5. +12 [en]' . $ua->agent); $ua->agent('Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 5. +12 [en]'); $req = HTTP::Request->new(GET => 'http://www.chollonet.com/trucoteca/ +truco.php?idjuego=598&plataforma=4'); print "$id\n"; $html=$ua->request($req)->as_string;
I get HTTP-400 bad request. How can I make loop with LWP, then? Thank You very much in advance$ua = new LWP::UserAgent; $ua->agent('Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 5. +12 [en]' . $ua->agent); $ua->agent('Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 5. +12 [en]'); $req = HTTP::Request->new(GET => 'http://www.chollonet.com/trucoteca/ +truco.php?idjuego=$id&plataforma=4'); #<-----JUST USE $ID insted of +number print "$id\n"; $html=$ua->request($req)->as_string;
In reply to Batch web fetch scipt by HTTP-404
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |