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

problem with frames

Thread Next
From:
=?iso-8859-1?q?arturo=20didonna?=
Date:
April 29, 2001 05:32
Subject:
problem with frames
Message ID:
20010429123207.89906.qmail@web11503.mail.yahoo.com
I am trying to access a URL using an LWP user agent,
but I get a response that says something like "You
Will need a frames-compatible browser to use this
site."  I am wondering if someone can kindly tell me
if there is a way to get around this requirement,
i.e., somehow fool the responding server to think I
have what it needs, i.e., a frames-compatible brower.
Please note I am already using a a legit UA string
(not a shorthand version)
e.g.

 $ua->agent ("Mozilla/4.0 (compatible; MSIE 4.01;
Windows 95)");

Thanks in advance.

Arturo DiDonna

===============================================

#!/usr/local/bin/perl

use strict;
use LWP::Debug qw (+);
use HTTP::Response;
use HTTP::Request;
use LWP::UserAgent;
use HTTP::Cookies;
use HTTP::Request::Common;


my ($cookie_jar, $ua, $response, $sessid,$url);
########MAIN PROGRAM==========================
my ($content, $req);



$cookie_jar = HTTP::Cookies->new(file=>"cookies.dat");
$ua = LWP::UserAgent->new();
$ua->agent ("Mozilla/4.0 (compatible; MSIE 4.01;
Windows 95)");
$ua->timeout(600);

$req =
 
HTTP::Request->new(GET=>"http://tradequote.fineco.it");


$cookie_jar->add_cookie_header($req);
$response = $ua->request($req);
$cookie_jar->extract_cookies($response);
$content = $response->content();
print $content;


______________________________________________________________________
Do You Yahoo!?
Il tuo indirizzo gratis e per sempre @yahoo.it su http://mail.yahoo.it

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About