Connecting to Website with a Login/Cookie via a Proxy in Perl -
i wrote following script in perl connect website using proxy. granted proxy address might not functional @ instant, conditional on proxy address yielding no problems, code works fine.
i wondering how may extend website in there cookie , in must provide login. is, in code, use: $mech->submit_form(). problem not how code $mech stuff cookie , login (i have done that), rather, how can via proxy address. ask, in part, because not sure how in web browser.
#!/usr/bin/perl use strict; use warnings; use utf8; use www::mechanize; use www::mechanize::link; use lwp::useragent; use data::dumper; begin { $| = 1 } $env{'http_proxy'} = 'http://66.35.68.145:7808'; $env{'https_proxy'} = 'http://66.35.68.145:7808'; $mech = www::mechanize->new(); $response = $mech->get("http://whatismyipaddress.com/"); print dumper($response->decoded_content);
you try using www::curl
Comments
Post a Comment