cURL / Mailing Lists / curl-library / Single Mail

curl-library

posting a file

From: Jürgen Ladstätter <info_at_innova-studios.com>
Date: Thu, 24 Jul 2008 09:20:09 +0200

hi there,

i’m new to curl and so it is sometimes a little bit confusing using libcurl
in my c++ program. I want to post a file to a php script to store it on a
server. I used several methods on how to post them, but they always get
POSTed ($_POST) and don’t occur in $_FILES.

In the docs I found theses parameters that would do what I want:
curl -F upload=@localfilename -F press=OK [URL]
But they are only useful when using the cmd line tool. How can this be done
with libcurl?

kind regards, juergen
Received on 2008-07-24