Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/perl
- use LWP;
- use HTTP::Request::Common;
- my ($url, $file) = @ARGV;
- my $ua = LWP::UserAgent->new();
- my $req = POST $url,
- Content_Type => 'form-data',
- Content => [
- ##rediger en fonction du formulaire
- Filedata => [ "$file", "file.gif", Content_Type =>
- 'image/gif' ],
- folder => "/uploadify/"
- ];
- my $res = $ua->request( $req );
- if( $res->is_success ) {
- print $res->content;
- } else {
- print $res->status_line, "\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement