Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

davidrw's scratchpad

by davidrw (Prior)
on Feb 02, 2005 at 03:25 UTC ( [id://427129]=scratchpad: print w/replies, xml ) Need Help??

use strict; use warnings; use WWW::Mechanize; use MIME::Base64; my $PW = 'PWPWPW'; my $auth = MIME::Base64::encode("" . ':' . $PW); my $mech = WWW::Mechanize->new(); #$mech->default_headers->authorization_basic("", $pw); $mech->add_header( 'Authorization' => 'Basic ' . $auth ); $mech->get('http://192.168.1.254/left1.htm'); print $mech->content; __END__ my $mech = WWW::Mechanize->new(); my @args = (Authorization => "Basic " . MIME::Base64::encode("" . ':' . $PW)); $mech->credentials('192.168.1.254:80', 'ABCDEF', "", $PW); $mech->get('http://192.168.1.254/', @args); print $mech->content; warn MIME::Base64::encode("" . ':' . $PW) . "-"; __END__ my $mech = WWW::Mechanize->new(); #$mech->default_headers->authorization_basic("", $pw); #$mech->add_header( 'Authorization' => 'Basic OmVsbHkwMA==' ); #$mech->get('http://192.168.1.254/left1.htm'); $mech->get('http://www.google.com'); print $mech->content;
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-24 22:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found