|
|
 |
Perl Query using HTTPS
date posted 20th August 2000 17:16
Hi All
I'm completely new to Perl but have been asked to
construct some test scripts that interact with a
series of web pages.
I've started using the LWP module but have run into
problems as the site uses https.
Can anyone shed any light on what I should do.
I enclose a snippet of the code:
use LWP;
$ua = new LWP::UserAgent;
# Create a request
my $req = new HTTP::Request POST =>
'https://someserver/login.html';
$req->content('username=someusername&password=somepassword');
# Pass request to the user agent and get a response
back
my $res = $ua->request($req);
# Check the outcome of the response
if ($res->is_success) {
print $res->content;
} else {
print "Bad luck this time
";
print $res->error_as_HTML
}
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
|
 |
|