In addition to basic RPC functions, XML-RPC provides various utility functions to convert PHP data into XML-RPC compatible data types. Utility functions also provide a set of APIs to support HTTPS transactions. The utility functions are:
XMLRPC_prepare : Transforms data into the appropriate data structure to be serialized into an XML-RPC message. For example, if you pass an associative array as an argument to the XMLRPC_prepare() function, the XMLRPC_prepare() function serializes it into an XML-RPC struct. The syntax of the XMLRPC_prepare() function is:
XMLRPC_prepare($data, $type = NULL)
XMLRPC_request : Connects to the site specified as argument to the XMLRPC_request() function, at the specified location, calls the method, and passes the parameters to the method. The syntax of the XMLRPC_request() function is:
XMLRPC_request($siteName, $location, $methodName, $param = NULL, $useragent = NULL)
XMLRPC_response() : Sends back an XML-RPC response to the server. The syntax of the XMLRPC_response() function is:
XMLRPC_response($return_value, $server = NULL)
XMLRPC_error() : Sends an XML-RPC error message. The syntax of the XMLRPC_error() function is:
XMLRPC_error($fault_Code, $fault_String, $server = NULL)
XMLRPC_convert_timestamp_to_iso8601() : Lets you set the formatted time string required by XML-RPC. The syntax of the XMLRPC_convert_timestamp_to_iso8601() is function
XMLRPC_convert_timestamp_to_iso8601($timestamp)
count_numeric_items() : Returns the number of numeric indices of an array. The syntax of the count_numeric_items() is function is:
count_numeric_items($array)
XML_serialize() : Accepts a data structure, and serializes it into XML format. The syntax of the XML_serialize() function is:
& XML_serialize($data)
XMLRPC_debug_print : Displays a table of debug messages and erases the debugging logs to ensure the error messages are not repeated. The syntax of the XML_serialize() function is:
function XMLRPC_debug_print()
XMLRPC_debug() : Logs the debugging messages. The syntax of the XMLRPC_debug() function is:
XMLRPC_debug($function_name, $debug_message)
XMLRPC_adjustValue() : Converts an XML-RPC data structure into a native PHP data structure. The syntax of the XMLRPC_adjustValue() function is:
& XMLRPC_adjustValue(&$current_node)