cURL / Mailing Lists / curl-users / Single Mail


Re: How to properly urlencode?

From: Dan Fandrich <>
Date: Fri, 7 Feb 2014 08:41:15 +0100

On Thu, Feb 06, 2014 at 06:11:57PM -0600, Anthony Papillion wrote:
> I'm trying to pass some form parameters to a php script using cURL. I'm
> using --data-urlencode to do it but I've run into a snag. Any field that
> has multiple words only shows up as the first word to my script. So, for
> example, if I have
> --data-urlencode "asentence=The quick brown fox"
> The script will only see "the" and nothing else
> I'm sure this is something I'm doing wrong but, being new to cURL, I'm
> not sure what. Can someone offer me a correction?

I tried this, and curl is doing the right thing. You can use the --trace-ascii
parameter to see what curl sends, which is:


It sounds like a problem in the server-side script receiving the data.

>>> Dan
List admin:
Received on 2014-02-07