Simple XMLRPC 是 一个 PHP 语言对 XML-RPC 协议的封装。
示例代码:
`<?php require_once (‘simpleXMLRPCClient.class.php’);
$server_path = ‘/simplexmlrpc/index.php’; $server_hostname = ‘localhost’; $sendHTTPS = ; $serverPort = NULL;
$xmlrpc = new SimpleXMLRPCClient (); $xmlrpc->debug = ; $xmlrpc->SetXMLRPCServer ($server_hostname, $server_path, $serverPort, $sendHTTPS);
$arrayOfStructs = Array ( Array (‘curly’ => 3), Array (‘curly’ => 2) );
$xmlrpc->CreateXMLRPCMessage (‘validator1.arrayOfStructsTest’);
$xmlrpc->AddArray ($arrayOfStructs);
$array = $xmlrpc->SendXMLRPC ();
print_r ($array);
?>`