curl-and-php
RE : Slashes and quotes
Date: Tue, 6 Jul 2004 10:50:23 +0200
Antonio,
You must have magic_quotes_gpc or magic_quotes_runtime activated in your
php.ini
This strips out ' and " characters...
Stephane
-----Message d'origine-----
De : curl-and-php-bounces_at_cool.haxx.se
[mailto:curl-and-php-bounces_at_cool.haxx.se] De la part de Daniel Stenberg
Envoyé : mardi 6 juillet 2004 10:39
À : Antonio Navarro Navarro; using curl with PHP
Objet : Re: Slashes and quotes
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.htmlReceived on 2004-07-06