cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Issue with sending arrays in CURLOPT_POSTFIELDS

From: Alex Judd <alex_at_skywire.co.uk>
Date: Wed, 8 Jul 2009 18:14:48 +0100

Hi everyone

 

Thanks for the reply to my earlier Curl Proxy Cookies question - got that
all working great thanks to Liu Shan Shut!

 

I'm having issues sending Arrays in CURLOPT_POSTFIELDS and wondered if there
was any advice anyone had on this?

 

Basically I have an array of radio boxes, that POST to Curl for it to proxy,
and in my POST -> CURLOPT_POSTFIELDS function, I try and flatten them with
$key = $value&$key2 = $value2 etc.

 

Arrays however come in as

 

$key = 'key' and

$value = Array

 

And this gets rejected (or at least seem to be) rejected by the server at
the other end which is expecting a 'item.array[array number].value' to come
through.

 

Any ideas as to the best way to deal with this - any advice much
appreciated!!

 

Thanks in advance

 

Alex

 

Skywire | <http://www.skywire.co.uk> www.skywire.co.uk |
<mailto:alex_at_skywire.co.uk> alex at skywire dot co dot uk

Please don't print this email and help the environment

 

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2009-07-08