cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Uploading a file via HTTP Post

From: Robert Iakobashvili <coroberti_at_gmail.com>
Date: Sat, 30 Jun 2007 21:56:43 +0200

On 6/30/07, Emil Romanus <sdac.bithack_at_gmail.com> wrote:
> Hi Carter,
>
> 2007/6/30, Carter R. Harrison <carterharrison_at_mac.com>:

> > curl_easy_setopt(mCURL, CURLOPT_POSTFIELDS, post);

Jm2c:

From formadd man page for multipart formdata RFC1867 to use:

 /* Set the form info */
       curl_easy_setopt(curl, CURLOPT_HTTPPOST, post);

> > curl_easy_setopt(mCURL, CURLOPT_POST, 1);
> > curl_easy_setopt(mCURL, CURLOPT_URL, "http://localhost/index.php" );

-- 
Sincerely,
Robert Iakobashvili,
coroberti %x40 gmail %x2e com
...........................................................
http://curl-loader.sourceforge.net
A web testing and traffic generation tool.
Received on 2007-06-30