Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: WWW:::Mechanize and credentials

by Limbic~Region (Chancellor)
on Mar 09, 2005 at 15:52 UTC ( #437937=note: print w/replies, xml ) Need Help??


in reply to WWW:::Mechanize and credentials

Sifmole,
While the other answers in this thread are good, sometimes it helps to have example code:
#!/usr/bin/perl use strict; use warnings; use WWW::Mechanize; my $url= 'http://10.11.12.13/password.html'; my $mech = WWW::Mechanize->new( autocheck => 1 ); $mech->credentials( '10.11.12.13:80', 'ABCDEF', 'admin' => 'password' ); $mech->get( $url ); print $mech->content();

Cheers - L~R

Replies are listed 'Best First'.
Re^2: WWW:::Mechanize and credentials
by petdance (Parson) on Mar 10, 2005 at 17:42 UTC
    Nice. I've added this to the Mech Cookbook.

    xoxo,
    Andy

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://437937]
help
Chatterbox?
LanX ... and git in general
[erix]: I've been to Amsterdam before you were born
[LanX]: 1899?
[chacham]: Just paint the white house black again.
dbander snorts
LanX Gesundheit! :)
talexb wonders about dividing developers in those born before the Unix timestamp of zero .. and after. Spoiler: I'm before.
chacham remebers I am a mad scientist
[stevieb]: talexb I'm after by a few years, but we can still be friends because you live in my hometown ;)

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (12)
As of 2017-08-18 13:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (302 votes). Check out past polls.

    Notices?