#!perl # Automated navigation through web pages use strict; use warnings; use WWW::Mechanize; use LWP::Debug '+'; use Data::Dumper; my $a = WWW::Mechanize->new( autocheck => 1, agent => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)' ); my $testpage = 'http://myprodportalv2.unocal.com:7778/portal/page?_pageid=33,30917,33_30962&_dad=puno2o&_schema=PORTAL_PUNO2O'; $a->get($testpage); $a->success() or do { open PAGE, '>failpage.html'; print PAGE Dumper($a); close PAGE; die 'Get failed: "'.$a->res->status_line."\" for\n".$testpage."\n or ".$a->base()."\n"; }; #### C:\Documents and Settings\johnsro\My Documents\Perl>perl myfinint2.pl LWP::UserAgent::new: () LWP::UserAgent::request: () HTTP::Cookies::add_cookie_header: Checking myprodportalv2.unocal.com for cookies HTTP::Cookies::add_cookie_header: Checking .unocal.com for cookies HTTP::Cookies::add_cookie_header: Checking unocal.com for cookies HTTP::Cookies::add_cookie_header: Checking .com for cookies LWP::UserAgent::send_request: GET http://myprodportalv2.unocal.com:7778/portal/page?_pageid=33,30917,33_30962&_dad=puno2o&_schema=PORTAL_PUNO2O LWP::UserAgent::_need_proxy: Not proxied LWP::Protocol::http::request: () LWP::UserAgent::request: Simple response: Not Implemented Get failed: "501 Not Implemented" for http://myprodportalv2.unocal.com:7778/portal/page?_pageid=33,30917,33_30962&_dad=puno2o&_schema=PORTAL_PUNO2O or http://myprodportalv2.unocal.com:7778/portal/page?_pageid=33,30917,33_30962&_dad=puno2o&_schema=PORTAL_PUNO2O #### $VAR1 = bless( { 'req' => bless( { '_content' => '', '_uri' => bless( do{\(my $o = 'http://myprodportalv2.unocal.com:7778/portal/page?_pageid=33,30917,33_30962&_dad=puno2o&_schema=PORTAL_PUNO2O')}, 'URI::http' ), '_headers' => bless( { 'user-agent' => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)' }, 'HTTP::Headers' ), '_method' => 'GET' }, 'HTTP::Request' ), 'status' => '501', 'content' => '', 'ct' => 'text/plain', 'res' => bless( { '_protocol' => 'HTTP/1.1', '_content' => '', '_rc' => 501, '_headers' => bless( { 'connection' => 'Close', 'client-response-num' => 1, 'cache-control' => 'private', 'date' => 'Wed, 19 Nov 2003 14:45:01 GMT', 'client-peer' => '141.146.165.174:7778', 'content-length' => '0', 'client-date' => 'Wed, 19 Nov 2003 14:45:02 GMT', 'content-type' => 'text/plain', 'server' => 'Oracle9iAS/9.0.2.2.0 Oracle HTTP Server Oracle9iAS-Web-Cache/9.0.2.2.0 (N)' }, 'HTTP::Headers' ), '_msg' => 'Not Implemented', '_request' => $VAR1->{'req'} }, 'HTTP::Response' ), 'page_stack' => [], 'redirected_uri' => $VAR1->{'req'}{'_uri'}, 'requests_redirectable' => [ 'GET', 'HEAD', 'POST' ], 'from' => undef, 'timeout' => 180, 'parse_head' => 1, 'base' => bless( do{\(my $o = 'http://myprodportalv2.unocal.com:7778/portal/page?_pageid=33,30917,33_30962&_dad=puno2o&_schema=PORTAL_PUNO2O')}, 'URI::http' ), 'quiet' => 0, 'protocols_forbidden' => undef, 'no_proxy' => [], 'protocols_allowed' => undef, 'use_eval' => 1, 'agent' => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)', 'cookie_jar' => bless( { 'COOKIES' => {} }, 'HTTP::Cookies' ), 'proxy' => {}, 'max_size' => undef }, 'WWW::Mechanize' );