Hello,
I am trying to pull some info from a HTTPS website. I am using LWP with the Crypt-SSLeay module for https support. I am able to connect to the site, but I am returned a page saying my browser is not cookie enabled and the page I want is not accessible. Is it possible to access such data outside of a browser via perl and fake the server into thinking you have cookies enabled. I know there are some modules within in LWP for cookie handling, but before I spend alot of time attempting this I want to make sure it is possible to do what I want to do. My code is as follows:
#use strict;
#use warnings;
use LWP::UserAgent;
my $uri = 'my $ua = LWP::UserAgent->new;
my $req = HTTP::Request->new(GET => $uri);
my $res = $ua->request($req);
if ($res->is_success) {
print $res->as_string;
} else {
print "Failed to GET '$uri': ", $res->status_line, "\n";
}
If I enter the url in my browser, the correct page is returned.
Thanks in advance.
I am trying to pull some info from a HTTPS website. I am using LWP with the Crypt-SSLeay module for https support. I am able to connect to the site, but I am returned a page saying my browser is not cookie enabled and the page I want is not accessible. Is it possible to access such data outside of a browser via perl and fake the server into thinking you have cookies enabled. I know there are some modules within in LWP for cookie handling, but before I spend alot of time attempting this I want to make sure it is possible to do what I want to do. My code is as follows:
#use strict;
#use warnings;
use LWP::UserAgent;
my $uri = 'my $ua = LWP::UserAgent->new;
my $req = HTTP::Request->new(GET => $uri);
my $res = $ua->request($req);
if ($res->is_success) {
print $res->as_string;
} else {
print "Failed to GET '$uri': ", $res->status_line, "\n";
}
If I enter the url in my browser, the correct page is returned.
Thanks in advance.