Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscape Cookie Problem

Status
Not open for further replies.

programingnoob

Technical User
Dec 31, 2002
71
CA
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!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top