blob: 6060a0e5e460de4d6aeb5bd88220443d954cb1a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
<?php
# Lifter002: TODO
# Lifter007: TODO
# Lifter003: TODO
# Lifter010: TODO
require_once __DIR__ . '/webservice_client.php';
class XML_RPC_WebserviceClient extends WebserviceClient
{
public function __construct($webservice_url)
{
$this->client = new xmlrpc_client($webservice_url);
#$this->client->verifyhost = true;
$this->client->debug = false;
$this->client->verifypeer = false;
$this->client->response_timeout = 7600;
$this->client->return_type = 'phpvals';
}
public function &call($method_name, &$args)
{
$xmlrpc_args = [];
foreach ($args as $arg)
{
$xmlrpc_args[] = php_xmlrpc_encode($arg);
}
$xmlrpc_return = $this->client->send(new xmlrpcmsg($method_name, $xmlrpc_args), 300);
return $xmlrpc_return->value();
}
}
|