Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connect to a web site on https (ssl)

Status
Not open for further replies.

bizzzzzzz

Technical User
Jan 20, 2005
15
CA
Is-it possible to open a page on a web server with https?
i just want to get the page on port
BUt it seems hard

thanks

Eric
 
well thanks for your help!
first step work thanks again
This is the next step....

use LWP 5.64;
my $url = ' # Yes, HTTPS!
my $browser = LWP::UserAgent->new;
my $response = $browser->get($url);
die "Error at $url\n ", $response->status_line, "\n Aborting"
unless $response->is_success;
print "Whee, it worked! I got that ",
$response->content_type, " document!\n";

This code work for the default page, this page is the authentification page...

i want to go more deep like this

this pages need to be authenticate (user password)

how i can do that?
 
Next step....

I test this and it doesn't work and i dont know why

use LWP 5.64;
my $url = ' # Yes, HTTPS!

my $browser = LWP::UserAgent->new;

$browser->credentials('servertest:8009','','theuser' => 'thepassword');

my $response = $browser->get($url);
die "Error at $url\n ", $response->status_line, "\n Aborting"
unless $response->is_success;
print "Whee, it worked! I got that ",
$response->content_type, " document!\n";
print $response

this is the error message!!

D:\>perl testhttps.txt
Error at 401 Unauthorized
Aborting at testhttps.txt line 16.

I already test the account and it work fine

Can someone help me?
 
I guess the obvious question is... is the username and password right? By the error message it looks like the server got your credentials but didn't approve of them and gave a 401 Unauthorized.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top