Hi,
For some hard-to-describe reason, I would need to post (using curl and post) a string so that it is recognized as an array by the target site. I cannot directly post an array. So I am trying the following :
[code=php]$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,”http://www.bla.com”);
curl_setopt($ch, CURLOPT_POST, 1);
$all=”Array”.”rn”.”(“.”rn”.”[name] => paul”.”rn”.”)”.”rn”;
curl_setopt($ch, CURLOPT_POSTFIELDS, $all);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result=curl_exec ($ch);
curl_close ($ch);
print $result;
Somehow, this does not work (I do not know how to post as an array…). Can anyone help me with this rather unusual quest ?
Many thanks in advance !!!