|
Posted by devranger on 12/14/06 07:31
Rik wrote:
> 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
Rik -
So you are suggesting I use an array but what do you mean by e
ampersads? Does that mean the ":" should be and &?
The reason I placed the colons is that they are just part of the field
input name I thought was necessary for the post. For instance, one
field on the form is called
MasterTemplate:_PageTemplate:cphCenterContent:CenterContent:zipTextBox.
Looks real weird to me as well but I do not know any other way to post
to the field than to call it as specified in the input name of the form
i.e. <input
name="MasterTemplate:_PageTemplate:cphCenterContent:CenterContent:zipTextBox"
type="text" maxlength="5"
id="MasterTemplate__PageTemplate_cphCenterContent_CenterContent_zipTextBox"
tabindex="1" class="dealertext" style="width:100px;" size="20" />
Is this incorrect?
Thank you.
[Back to original message]
|