You are here

function xmlrpc in xmlrpc 8

Performs one or more XML-RPC request(s).

Usage example:

$result = xmlrpc('http://example.com/xmlrpc', array(
  'service.methodName' => array(
    $parameter,
    $second,
    $third,
  ),
));

Parameters

string $url: An absolute URL of the XML-RPC endpoint.

array $args: An associative array whose keys are the methods to call and whose values are the arguments to pass to the respective method. If multiple methods are specified, a system.multicall is performed.

array $headers: (optional) An array of headers to pass along.

Return value

mixed For one request: Either the return value of the method on success, or FALSE. If FALSE is returned, see xmlrpc_errno() and xmlrpc_error_msg(). For multiple requests: An array of results. Each result will either be the result returned by the method called, or an xmlrpc_error object if the call failed. See xmlrpc_error().

11 calls to xmlrpc()
XmlRpcBasicTest::testInvalidServer in src/Tests/XmlRpcBasicTest.php
Addresses bug https://www.drupal.org/node/2146833 .
XmlRpcExampleClientForm::submitAdd in xmlrpc_example/src/Form/XmlRpcExampleClientForm.php
Submit handler to query xmlrpc_example.add.
XmlRpcExampleClientForm::submitAddSubtract in xmlrpc_example/src/Form/XmlRpcExampleClientForm.php
Submit a multicall request.
XmlRpcExampleClientForm::submitInformation in xmlrpc_example/src/Form/XmlRpcExampleClientForm.php
Submit handler to query system.listMethods.
XmlRpcExampleClientForm::submitSubtract in xmlrpc_example/src/Form/XmlRpcExampleClientForm.php
Submit handler to query xmlrpc_example.subtract.

... See full list

2 string references to 'xmlrpc'
XmlRpcBasicTest::testInvalidMessageParsing in src/Tests/XmlRpcBasicTest.php
Ensure that XML-RPC correctly handles invalid messages when parsing.
XmlRpcMessagesTest::testRequestAndResponseEncodingDefinitions in src/Tests/XmlRpcMessagesTest.php
Check XML-RPC client and server encoding information.

File

./xmlrpc.module, line 57
Enables XML-RPC functionality.

Code

function xmlrpc($url, array $args, array $headers = []) {
  module_load_include('inc', 'xmlrpc');
  return _xmlrpc($url, $args, $headers);
}