You are here: Re: Having Trouble With CURL Function, Please Help « PHP Programming Language « IT news, forums, messages
Re: Having Trouble With CURL Function, Please Help

Posted by Rik on 12/14/06 07:05

Andy Hassall wrote:
> On 13 Dec 2006 10:44:06 -0800, "devranger" <knee-dragger@hotmail.com>
> wrote:
>
>>
$data="MasterTemplate:_PageTemplate:cphCenterContent:CenterContent:fcDropDo
wnList=ATVs&MasterTemplate:_PageTemplate:cphCenterContent:CenterContent:zip
TextBox=77090";
>> [snip] curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
>
> What's with the colons in the data? That doesn't look like the sort
> of data
> that you'd normally send in a POST.

Yup, AFAIK it stil should e ampersands.
Let cURL handle it though:
$topost = array(
'key1' => 'value',
'key2' => 'value2'
//etc...
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $topost );

--
Rik Wasmus

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация