Thread Bitte Feedback und Diskussion Net::HTTP10
(11 answers)
Opened by rosti at 2011-03-21 18:51
So kann man es machen.
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; my $ua = LWP::UserAgent->new(); my $service = 'http://rolfrost.de/cgi-bin/100.cgi'; my $res=$ua->get($service, ':read_size_hint' => 4, ':content_cb' => sub { my ($data, $response, $protocol) = @_; printf("%u\n",unpack('N', $data)); }); if ($res->is_success) { print "OK\n"; } else { print "ERROR\n"; } |