cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

RE: How to Post file to url using Curl

From: Broekhuis,Robert R. <BROEKHRR_at_airproducts.com>
Date: Wed, 19 Jul 2006 13:42:40 -0400

Will Daniel's reply to my similar request be of use?
Copied below:
 
Subject: Re: How to post file data?

On Tue, 18 Jul 2006, Broekhuis,Robert R. wrote:

> I'm trying to write a script for automatic uploading of file data to a

> remote server (form using enctype=multipart/formdata). For ordinary

> POST forms, I just format the header data as if it were a querystring,

> and provide it as the POSTDATA parameter. Where can I read about how

> to format this parameter for file upload data?

That is strangely undocumented in the PHP/CURL world. And if you ask me,
it is done in a weird way. Here's one example at least:

http://curl.haxx.se/libcurl/php/examples/multipartpost.html
<http://curl.haxx.se/libcurl/php/examples/multipartpost.html>

 

________________________________

From: curl-and-php-bounces_at_cool.haxx.se
[mailto:curl-and-php-bounces_at_cool.haxx.se] On Behalf Of Long Lam
Sent: Wednesday, July 19, 2006 1:03 PM
To: curl-and-php_at_cool.haxx.se
Subject: How to Post file to url using Curl

Hello,
 
I have been scratching my brain to figure out how to send an xml file
via curl through a post to a url that will accept the file. Please let
me know if you guys have any ideas, I have yet to find the answer
anywhere on the web.
 
Thanks in advance,
Long

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2006-07-19