How to POST multidimensional array data
Dshah <[email protected]> Sat, 22 Feb 2014 01:34:22 +0200
| Newsgroups | gmane.comp.web.curl.php |
|---|---|
| Message-ID | <CAOOxsY5+wVVo5r1P=V_gGza7Y2Htk=9b=qe+XHBSDPyL0cQVCg@mail.gmail.com> |
--===============0965605920== Content-Type: multipart/alternative; boundary=f46d0444047ac8e6a704f2f30f1a --f46d0444047ac8e6a704f2f30f1a Content-Type: text/plain; charset=ISO-8859-1 Hi, I have to post and a site which is using data like multidimensional arrays like Content-Disposition: form-data; name="attributes['price']" Content-Disposition: form-data; name="features['URGENT'].productName" $postFields = array ( 'attributes[\'price\'].productName' => 'URGENT', 'features[\'URGENT\'].productName' => 'URGENT' ); is that the right way to send post data? Because its not returning any result and no error.. Thanks --f46d0444047ac8e6a704f2f30f1a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Hi,=A0</div><div>I have to post and a site which is u= sing data like multidimensional arrays like</div><div><br></div><div><pre c= lass=3D"" style=3D"margin-top:0px;margin-bottom:10px;padding:5px;border:0px= ;font-size:13.600000381469727px;vertical-align:baseline;background-color:rg= b(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console',&= #39;Liberation Mono','DejaVu Sans Mono','Bitstream Vera San= s Mono','Courier New',monospace,serif;overflow:auto;width:auto;= max-height:600px;word-wrap:normal;color:rgb(0,0,0);line-height:17.804800033= 569336px"> <code style=3D"margin:0px;padding:0px;border:0px;font-size:13.6000003814697= 27px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida = Console','Liberation Mono','DejaVu Sans Mono','Bits= tream Vera Sans Mono','Courier New',monospace,serif;white-space= :inherit"><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;font-= size:13.600000381469727px;vertical-align:baseline;background-color:transpar= ent;color:gray">Content-Disposition: form-data; name=3D"attributes[= 9;price']"</span></code></pre> <pre class=3D"" style=3D"margin-top:0px;margin-bottom:10px;padding:5px;bord= er:0px;font-size:13.600000381469727px;vertical-align:baseline;background-co= lor:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console&= #39;,'Liberation Mono','DejaVu Sans Mono','Bitstream Ve= ra Sans Mono','Courier New',monospace,serif;overflow:auto;width= :auto;max-height:600px;word-wrap:normal;color:rgb(0,0,0);line-height:17.804= 800033569336px"> <pre class=3D"" style=3D"margin-top:0px;margin-bottom:10px;padding:5px;bord= er:0px;font-size:13.600000381469727px;vertical-align:baseline;font-family:C= onsolas,Menlo,Monaco,'Lucida Console','Liberation Mono',= 9;DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New= ',monospace,serif;overflow:auto;width:auto;max-height:600px;word-wrap:n= ormal"> <code style=3D"margin:0px;padding:0px;border:0px;font-size:13.6000003814697= 27px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida = Console','Liberation Mono','DejaVu Sans Mono','Bits= tream Vera Sans Mono','Courier New',monospace,serif;white-space= :inherit"><span class=3D"" style=3D"margin:0px;padding:0px;border:0px;font-= size:13.600000381469727px;vertical-align:baseline;background-color:transpar= ent;color:gray">Content-Disposition: form-data; name=3D"features['= URGENT'].productName"</span></code></pre> </pre></div><div><br></div><div>$postFields =3D array (</div><div><span cla= ss=3D"" style=3D"white-space:pre"> </span>'attributes[\'price\&#= 39;].productName' =3D> 'URGENT',<br></div><div><div><span cl= ass=3D"" style=3D"white-space:pre"> </span>'features[\'URGENT\&#= 39;].productName' =3D> 'URGENT'</div> </div><div>);</div><div><br></div><div>is that the right way to send post d= ata? Because its not returning any result and no error.. Thanks=A0</div></d= iv> --f46d0444047ac8e6a704f2f30f1a-- --===============0965605920== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php --===============0965605920==--