====== xmlrpc calls ======
===== command line =====
groups.getGroupMembers
GroupID
12345
RequestingAgentID
12345
curl -i -d @myfile.xml -X POST -w '%{http_code}\n' http://server
===== php =====
$request = xmlrpc_encode_request("groups.getGroupMembers", array(
"GroupID" => "12345",
"RequestingAgentID" => "12345"
));
//create the stream context for the request
$context = stream_context_create(array('http' => array(
'method' => "POST",
'header' => "Content-Type: text/xml\r\nUser-Agent: PHPRPC/1.0\r\n",
'content' => $request
)));
//URL of the XMLRPC Server
$server = 'http://server';
$file = file_get_contents($server, false, $context);
//decode the XMLRPC response
$response = xmlrpc_decode($file);
//display the response
print_r($response);
{{tag>xmlrpc curl cli}}