Hi,
Is what following code is correct ?
$function1 = ‘addressbook.boaddressbook.search’;
$param1 = array(‘start’ => ‘0’,‘limit’=>‘0’
,‘query’=>$_GET[‘searchs’]
,‘sort’=>‘asc’
,‘order’=>‘n_fileas’
,‘cquery’ =>’’
,‘include_users’ => ‘all’);
$res1= test($function1,$param1,$auth1);
test is a function
function test($function,$param, $auth)
{
$request = xmlrpc_encode_request($function,$param);
if($auth!='') $auth = "\nAuthorization: Basic $auth";
$context = stream_context_create(array('http' => array(
'method' => "POST",
'header' => "Content-Type:text/xml" . $auth,
'content' => $request
)));
$file = file_get_contents("http://gwdev.zoomacom.org/xmlrpc.php", false, $context);
$response = xmlrpc_decode($file);
if (xmlrpc_is_fault($response)) {
trigger_error("xmlrpc: $response[faultString] ($response[faultCode])");
}
return($response);
}
because I do not succeed read have the primary key of the table ?
Thanks you