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

curl-and-php

Re: problem posting a file with curl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 19 Jun 2002 14:04:02 +0200 (MET DST)

On Wed, 19 Jun 2002 fabian.grzeszeyk_at_alti.lu wrote:

> By posting the data to the remote page on the server side with the curl
> option:
>
> -->curl_setopt($ch, CURLOPT_POSTFIELDS, "strFile=".$strFile);
>
> The $strFile var contain the file data coming from the post.
>
> I don't think curl assume the url encoding

No, it doesn't. It posts whatever you pass to it.

> but I try to use the PHP urlencode function to encrypt post but data is
> always corrupted

The question is: was it corrupted on send or on retrieval?

What if you fire up a network analyzer and check out how the HTTP request is
sent? Or just use the CURLOPT_VERBOSE option?

(try a very small file to make it easier to see what happens)

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
----------------------------------------------------------------------------
                   Bringing you mounds of caffeinated joy
                   >>>     http://thinkgeek.com/sf    <<<
Received on 2002-06-19