Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: LWP Authorization Problem

by twerq (Deacon)
on Jul 26, 2001 at 08:24 UTC ( [id://99893]=note: print w/replies, xml ) Need Help??


in reply to LWP Authorization Problem

I guess then, in that case (since the page doesn't use HTTP authentication -- my mistake). . .

You're going to have to reverse-engineer their webpage a little bit. It's usually only as hard as finding out the <FORM> values of the two input boxes it uses for username and password.

Assuming these two values are named Username and Password, we can either use HTTP::Request POST or HTTP::Request GET to send that page our values.

Play around with this (untested):
# method 1: my $req = new HTTP::Request POST => 'http://www.environet.gov.on.ca/dwws-app/DWWSApp'; $req->content_type('application/x-www-form-urlencoded'); $req->content('username=frankie&password=tomato'); # method 2: $req = HTTP::Request->new(GET => 'http://www.environet.gov.on.ca/dwws-app/DWWSApp?username=franki +e&password=tomato');

. . . where dwws-app/DWWSApp is the name of the form in the ACTION attribute of the <FORM> element.

. .. post back with your findings!

--twerq

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://99893]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-25 07:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found