Re: CURL -d

From: Date: Mon, 26 Mar 2012 20:01:04 +0000
Subject: Re: CURL -d
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-317280@lists.php.net to get a copy of this message
I know guess that it is a POST field, but the detail is on simulate the -d without a label. I've already looked at setopt man page, but nothing seems like what I need. 2012/3/26 Ashley Sheridan <ash@ashleysheridan.co.uk> > ** > On Mon, 2012-03-26 at 09:45 -0600, QI.VOLMAR QI wrote: > > I have this lines: > curl -H "Content-Type: application/json" -d "hello world" \ > > "http://api.pusherapp.com/apps/17331/channels/test_channel/events?"\ > <http://api.pusherapp.com/apps/17331/channels/test_channel/events?%5C%3E> > > The option -d is for data. But How I can set it on the PHP CURL extension? > I have found that if I set something like array('Hello Word', 'name' > => 'my_name'), for the POST data may occurs. Can you give me a little > help? > > > > Have a look at curl_setopt() which can set those flags as you need inside > PHP: > > http://uk3.php.net/manual/en/function.curl-setopt.php > > > -- > Thanks, > Ash > http://www.ashleysheridan.co.uk > > >

« previous php.general (#317280) next »