curl-users
Re: Curl syntax question
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 20 Apr 2001 09:58:50 +0200 (MET DST)
Date: Fri, 20 Apr 2001 09:58:50 +0200 (MET DST)
On Fri, 20 Apr 2001, Ben Ward wrote:
> I'm calling curl from within PHP and getting the result of the command
> below.
> /usr/local/bin/curl -d arglist=arg1=1&arg2=2 https://www.somewebsite.com
>
> Problem is that the "arglist=arg1=1&arg2=2" doesn't work.
>
> The values that get sent in the POST look like this.
>
> arglist=arg1=1
> arg2=2
This looks like there's a problem with the letter '&'. In most unix shells,
it is a special character that needs escaping. Try using:
curl -d 'arglist=arg1=1&arg2=2' [URL]
Also, when you're using PHP, you could consider using the integrated PHP-curl
interface instead...
-- Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/Received on 2001-04-20