August 12th, 2012, 09:00 PM
Set refferer with pearl
Hey guys how can I set reffer with pearl.
I dont know nothing about pearl but I found this.
The following Perl code shows how to set the REFERER header in an HTTP request and convince the server that the request came from Login.html:
use HTTP::Request::Common qw(POST GET); use LWP::UserAgent; $ua = LWP::UserAgent->new(); $req = POST 'http://www.northwindtraders.com/dologin.asp', [ Username => 'mike', Password => 'mypa$w0rd', ]; $req->header(Referer => 'http://www.northwindtraders.com/login.html'); $res = $ua->request($req);
Thank you for help