develooper Front page | perl.libwww | Postings from December 2001

Help please !! ASAP !

Deepak Adinarayana
December 25, 2001 18:01
Help please !! ASAP !
Message ID:

Hi All,

I am a beginner with PERL and I have a small query here.Please look thro' these lines of code below where I am trying just to extract the HTML source by supplying the link as in the code.But I end up getting the message

Your browser is not accepting our cookies. To view this page,please set your browser preferences to accept cookies (code 0).

in HTML format !!! :-) in the file.

Here is my code.Please suggest ways to make it work.

my $ua = new LWP::UserAgent;

my $cookie_jar = HTTP::Cookies->new;

my $url = '';

my $file = 'tryfile';

my $request = new HTTP::Request ('GET' => $url);


$request->header('Accept' => 'text/html');

$request->header('Accept' => 'text/plain');

my $response;

my $response = $ua->request($request,$file);


Thanks in advance,

Deepak. Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About