I hvae to call AT&T api for getting the userinfo using the following parameter
$a=array( 'Target'=>'UserPermissions',
'Username'=>'isingh',
'RightID'=>array("Param" => 1, "Param" => 6, "Param" => 17, "Param"
=> 16, "Param" => 12,"Param" => 18));
How i will pass this in the curl
this is simple llok what i am doing
$a=array( 'Target'=>'GetUsers',
'Origin'=>array('Param' => 1));
$aa=http_build_query($a);
$Url = "http://apiee.uc.att.com/apiee/api/api.asp?".$aa;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $Url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
$res = simplexml_load_string(curl_exec($ch));
curl_close($ch);
echo "<pre>"; print_r($res); echo "</pre>";
This code is working fine, there is no nested array in $a
array("Param" => 1, "Param" => 6, "Param" => 17, "Param" => 16, "Param" => 12,"Param" => 18) === array("Param" => 18)is TRUE