I'm making a non-associative array, I then want to serialize this and send it to another page using CURL as so:
$test[]='T1';
$test[]='T2';
$test[]='T3';
$test[]='T4';
$test[]='T5';
$str = serialize($test);
$strenc = urlencode($str);
$url = '//myURL';
$ch = curl_init( $url );
curl_setopt( $ch, CURLOPT_POST, 1);
curl_setopt( $ch, CURLOPT_POSTFIELDS, $strenc);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt( $ch, CURLOPT_HEADER, 0);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
curl_exec( $ch );
But what should I use on the other page to get the serialized data. Without an associative array name index to call in the POST? I tried $_POST['test'];
but that didn't work.
TIA