User Tools

xmlrpc calls

command line

<?xml version="1.0" encoding="utf-8"?>
<methodCall>
<methodName>groups.getGroupMembers</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>GroupID</name>
     <value>
      <string>12345</string>
     </value>
    </member>
    <member>
     <name>RequestingAgentID</name>
     <value>
      <string>12345</string>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>
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);

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information