Leser: 2
9 Einträge, 1 Seite |
$Net::SSLeay::slowly = 1; # Add sleep so broken servers can keep up
1
2
3
4
5
6
7
8
9
10
use strict;
use Net::SSLeay;
$Net::SSLeay::trace = 0;
$Net::SSLeay::slowly = 1;
my ($page, $response, %foo) = Net::SSLeay::get_https('IP-adresse', 443, '/ser
vlet/webacc','');
print $page."\n";
print $response."\n";
1
2
HTTP/1.1 200 OK
CONTENT-TYPE/text/plain/DATE/Mon, 14 Nov 2005 22:22:03 GMT/SERVER/NetWare-Enterprise-Web-Server/5.1/CONNECTION/close
QuoteHast Du openSSL installiert?? Dazu muesste eigentlich was in der Doku zu CPAN: Net::SSLeay stehen...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Create a user agent object
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
# Create a request
my $req = HTTP::Request->new(POST => 'http://search.cpan.org/search');
$req->content_type('application/x-www-form-urlencoded');
$req->content('query=libwww-perl&mode=dist');
# 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 $res->status_line, "\n";
}
9 Einträge, 1 Seite |