programingnoob
Technical User
Hi,
My script here doesn't work. I checked the paths already, but nothing's wrong. So I suppose that the problem's in my Script. But I can't find the error. Can anyone ploease help me out?
The problem with this script is that it shows a request log in page, instead of a page that already has an accont logged in. I logged in to that webapge, in Netscape, and my computer saved a cookie of that webpage and I am trying to get my script to use that cookie.
#!/usr/bin/perl
use LWP;
my $browser = LWP::UserAgent->new();
use HTTP::Cookies::Netscape;
my $cookie_jar = HTTP::Cookies::Netscape->new(
'file' => 'C:\Documents and Settings\undead\Application Data\Mozilla\Profiles\default\cookies.txt',
);
$browser->cookie_jar($cookie_jar);
my $response = $browser->get('open OUT, ">response.htm";
print OUT $response->content;
close OUT;
exit;
#eof
Thanks!!!!
My script here doesn't work. I checked the paths already, but nothing's wrong. So I suppose that the problem's in my Script. But I can't find the error. Can anyone ploease help me out?
The problem with this script is that it shows a request log in page, instead of a page that already has an accont logged in. I logged in to that webapge, in Netscape, and my computer saved a cookie of that webpage and I am trying to get my script to use that cookie.
#!/usr/bin/perl
use LWP;
my $browser = LWP::UserAgent->new();
use HTTP::Cookies::Netscape;
my $cookie_jar = HTTP::Cookies::Netscape->new(
'file' => 'C:\Documents and Settings\undead\Application Data\Mozilla\Profiles\default\cookies.txt',
);
$browser->cookie_jar($cookie_jar);
my $response = $browser->get('open OUT, ">response.htm";
print OUT $response->content;
close OUT;
exit;
#eof
Thanks!!!!