我使用以下参数调用 AT&T api 来获取用户信息
$a=array( 'Target'=>'UserPermissions',
'Username'=>'isingh',
'RightID'=>array("Param" => 1, "Param" => 6, "Param" => 17, "Param"
=> 16, "Param" => 12,"Param" => 18));
我将如何在卷曲中传递这个
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>";
此代码工作正常,$a 中没有嵌套数组