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

curl-and-php

Re: Slashes and quotes

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 6 Jul 2004 10:39:23 +0200 (CEST)

On Tue, 6 Jul 2004, Antonio Navarro Navarro wrote:

> curl_setopt($ch, CURLOPT_HTTPHEADER, array('POST HTTP/1.1', 'Accept:
> text/plain', 'Content-length:'.strlen($xmlstream)));

1. You can't set the POST request with the CURLOPT_HTTPHEADER option (but it
    is already used since you set CURLOPT_POST and CURLOPT_POSTFIELDS)

2. "Content-length" is set automatically to the strlen of the data unless you
    set it yourself. CURLOPT_POSTFIELDSIZE is the option to use to set the
    post size.

> The content of the $_POST["xml"] variable received is :
>
> _POST["xml"] <?xml version=\"1.0\" encoding=\"UTF-8\"?>

[...]

curl doesn't translate anything, so that is either done by the server or by
PHP.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-07-06