cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: POSTing '*' (with PHP)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 16 Feb 2001 13:53:52 +0100 (MET)

On Fri, 16 Feb 2001, Sergej Rinc wrote:

(I CC this reply to Sterling Hughes, author of the PHP curl module.)

> I need to post a form with one field as '*' (apostrophes included in
> the field). This is my standard override for some registered database
> sites ... :-).
>
> I use latest PHP and latest curl. After testing I see that in
>
> culr_setopt ($ch, CURLOPT_POSTFIELDS, $postString)
>
> my postString (urlencoded string of parameters and values properly
> formatted as in GET URLs) includes this
>
> ...?name=%27%2A%27?...
>
> e.g. urlencoded '*' string but I get responses from the server that
> this field is empty. Of course non-urlencoded string is not the answer
> (it cannot be!). Where could be the problem?

I'll give you exactly the answer you don't want:

This is not exactly a libcurl problem. Curl posts *exactly* the data you pass
to it. Curl never encodes any data for you in that way.

Someone is encoding that data before it is passed to libcurl. I'd say that
someone is either you, the phpcurl module or someone else!

> Does Snoopy work correctly or the same <g>?

Doesn't Snoopy too base itself on curl?

> Any PHP-er to the rescue?

... you just made my idea of a separate special-purpose curl-php mailing list
sound more attractive... :-) Anyone else in favour?

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
Received on 2001-02-16