Thread HTTP Post Request & split(); (2 answers)
Opened by Gast at 2006-12-14 18:52

esskar
 2006-12-14 20:17
#72564 #72564
User since
2003-08-04
7321 Artikel
ModeratorIn

user image
zu 1:

erstmal der reaprierte code
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use strict;
use warnings;

use LWP::UserAgent;

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

my $response = $ua->post("http://ul29.rapidshare.com", [uri => "/files/7437031/1.txt.html", "dl.start" => "Free"]);

if ($response->is_success) {
print $response->content;
}
else {
die $response->status_line;
}


für sowas nutz ich auch gern CPAN:HTML::Form

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use strict;
use warnings;

use LWP::UserAgent;
use HTML::Form;

my $ua = LWP::UserAgent->new;
my $resp = $ua->get("http://ul29.rapidshare.com");
if( $resp->is_success ) {
my $f = HTML::Form->new( $resp->decoded_content( raise_error => 1 ), $resp->base );
$resp = $ua->request( $f->click );
if ($resp->is_success) {
print $resp->content;
}
else {
die $resp->status_line;
}
}


zu 2: schau dir doch mal noch CPAN:URI an\n\n

<!--EDIT|esskar|1166122220-->

View full thread HTTP Post Request & split();