http://qs321.pair.com?node_id=313467

shockme has asked for the wisdom of the Perl Monks concerning the following question:

I think I'm missing something fairly basic. I'm trying to access a website which requires frames. Following is my script:
#!/usr/bin/perl use strict; use warnings; use URI::URL; use LWP::UserAgent::FramesReady; my $ua = new LWP::UserAgent; # neither of the following have any effect #$ua->agent('Mozilla/5.0'); #$ua->agent('Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET C +LR 1.1.4322)'); my $url = URI->new('http://www.takingbackthecountry.com'); my $http_request = new HTTP::Request('GET', $url); my $response = $ua->request($http_request); if ($response->is_success and $response->isa('HTTP::Response::Tree')) { print "ok\n"; } else { print $response->content; } exit;
This results in the following output:
<HTML> <HEAD> <meta name="DESCRIPTION" content=""> <TITLE></TITLE> </HEAD> <!-- Redirection Services Redirector2B-DAL 200-OK --> <FRAMESET ROWS="100%, *" frameborder="no" framespacing=0 border=0> <FRAME SRC="http://takinthecountryback.com" NAME="mainwindow" frameb +order="no" framespacing="0" marginheight="0" marginwidth="0"></FRAME> </FRAMESET> <NOFRAMES> <CENTER> <H2> Your browser does not support frames. We recommend upgrading your + browser. </H2> <br><br> Click <a href="http://takinthecountryback.com">here</a> to enter th +e site. </CENTER> </NOFRAMES> </HTML>

I've dug through several of the test scripts included with LWP::UserAgent::FramesReady, but I'm just not seeing what I'm missing.

If things get any worse, I'll have to ask you to stop helping me.