Thread HTTP-Request senden (9 answers)
Opened by infer at 2007-03-15 12:45

Froschpopo
 2007-03-15 13:20
#9756 #9756
User since
2003-08-15
2653 Artikel
BenutzerIn
[default_avatar]
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl

use strict;

use LWP::UserAgent;
my $ua = LWP::UserAgent->new();


my $request = HTTP::Request->new('GET', $adress);
my $file = $ua->request($request);

if ($file->is_success()) {
print "Ok\n";
} else {
print "Fehler: ".$file->message();
}

falls du auch noch den inhalt brauchst kommst du mit $file->content() daran.

View full thread HTTP-Request senden