Is it possible to send a multi-associative array to a page using cURL in php?
I am able to pass an array, but the following happens:
// Open Connection
$ch = curl_init();
// Set the URL
curl_setopt($ch, CURLOPT_URL, $this->config['submission']['eyerys']);
// Set the number of fields being sent:
curl_setopt($ch,CURLOPT_POST,count($this->call['info']));
// The string to send:
curl_setopt($ch,CURLOPT_POSTFIELDS,$string);
// Return transfer:
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// SSL verification:
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
// Execute the post:
$result = curl_exec($ch);
$this->pre($result);
// Close connection:
$curl_close($ch);
I get the following output:
Array
(
[info] => Array
[answers] => Array
[errors] => Array
)