You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.1 KiB
43 lines
1.1 KiB
<?php |
|
/* |
|
IXR - The Inutio XML-RPC Library - (c) Incutio Ltd 2002 |
|
Version 1.61 - Simon Willison, 11th July 2003 (htmlentities -> htmlspecialchars) |
|
Site: http://scripts.incutio.com/xmlrpc/ |
|
Manual: http://scripts.incutio.com/xmlrpc/manual.php |
|
Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php |
|
*/ |
|
|
|
/** |
|
* IXR请求体 |
|
* |
|
* @package IXR |
|
*/ |
|
class IXR_Request { |
|
var $method; |
|
var $args; |
|
var $xml; |
|
function IXR_Request($method, $args) { |
|
$this->method = $method; |
|
$this->args = $args; |
|
$this->xml = <<<EOD |
|
<?xml version="1.0"?> |
|
<methodCall> |
|
<methodName>{$this->method}</methodName> |
|
<params> |
|
|
|
EOD; |
|
foreach ($this->args as $arg) { |
|
$this->xml .= '<param><value>'; |
|
$v = new IXR_Value($arg); |
|
$this->xml .= $v->getXml(); |
|
$this->xml .= "</value></param>\n"; |
|
} |
|
$this->xml .= '</params></methodCall>'; |
|
} |
|
function getLength() { |
|
return strlen($this->xml); |
|
} |
|
function getXml() { |
|
return $this->xml; |
|
} |
|
}
|
|
|