CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: Re: [jkepler] Using curl: Edit Log



FishMonger
Veteran / Moderator

Aug 22, 2015, 11:10 AM


Views: 4236
Re: [jkepler] Using curl

I have not tested this, but it's the starting point I'd use and adjust as needed.


Code
use HTTP::Request::Common; 
use LWP::UserAgent;

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

my $req = $ua->request( POST 'http://mydomain.com/script.php',
Content_Type => 'multipart/form-data',
Content => [ targets => [ 'filename' ] ]
);

my $response = $ua->request($req);



(This post was edited by FishMonger on Aug 22, 2015, 11:16 AM)


Edit Log:
Post edited by FishMonger (Veteran) on Aug 22, 2015, 11:16 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives