SimpleXMLRPC 介绍
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);
Array that we want to send
$arrayOfStructs = Array ( Array (‘curly’ => 3),
Array (‘curly’ => 2)
);
Create the XMLRPC message with the methodName
$xmlrpc->CreateXMLRPCMessage (‘validator1.arrayOfStructsTest’);
Now we simply add the array we want to send with the message
$xmlrpc->AddArray ($arrayOfStructs);
And now we send it and we get back an array
$array = $xmlrpc->SendXMLRPC ();
print out the returned array
print_r ($array);
?>`
SimpleXMLRPC 官网
http://simplexmlrpc.sourceforge.net/
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。