| |
|
|
|
cURL Mailing List Monthly Index Single Mail
curl-and-php mailing list Archives
Re: curl Upload: command line OK - libcurl/PHP problem!
From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Fri, 2 Apr 2004 13:36:50 +0200 (CEST)
On Fri, 2 Apr 2004, Harry Fearnley wrote:
> It seems that to do an Upload I have to set the CURLOPT_UPLOAD option, but
In curl lingo, we don't speak of "upload" when we do a POST. A POST is just a
> $result = curl_setopt($ch, CURLOPT_POST, 1);
This is what you want.
> #$result = curl_setopt($ch, CURLOPT_PUT, 1); # Doing a PUT -- needs
This is not what you want.
> #$result = curl_setopt($ch, CURLOPT_GET, 1);
And this isn't either.
> $result = curl_setopt($ch, CURLOPT_INFILE, $handle );
You want to use the CURLOPT_POSTFIELDS instead.
> $result = curl_setopt($ch, CURLOPT_INFILESIZE, filesize( $filename ) );
And you don't want this.
> $result = curl_setopt($ch, CURLOPT_POSTFIELDS,
While this is POST data, it is not multipart data like you provided with the
--
Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-04-02
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info