1. Go to this page and download the library: Download lstrojny/fxmlrpc library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lstrojny / fxmlrpc example snippets
$httpClient = new GuzzleHttp\Client();
$httpClient->...();
$client = new fXmlRpc\Client(
'http://endpoint.com',
new fXmlRpc\Transport\HttpAdapterTransport(
new \Http\Message\MessageFactory\DiactorosMessageFactory(),
new \Http\Message\StreamFactory\DiactorosStreamFactory(),
new \Http\Adapter\Guzzle7\Client($httpClient)
)
);
$httpClient = new GuzzleHttp\Client();
$httpClient->...();
$client = new fXmlRpc\Client(
'http://endpoint.com',
new fXmlRpc\Transport\HttpAdapterTransport(
new \Http\Message\MessageFactory\DiactorosMessageFactory(),
new \Http\Adapter\Guzzle6\Client($httpClient)
)
);
$httpClient = new GuzzleHttp\Client();
$client = new fXmlRpc\Client(
'http://endpoint.com',
new fXmlRpc\Transport\Guzzle4Bridge($httpClient)
);
$httpClient = new GuzzleHttp\Client();
$httpClient->...();
$client = new fXmlRpc\Client(
'http://endpoint.com',
new fXmlRpc\Transport\HttpAdapterTransport(new Ivory\HttpAdapter\GuzzleHttpHttpAdapter($httpClient))
);
$client = new fXmlRpc\Client('http://endpoint.com');
$client->call('remoteMethod', array('arg1', true));
$client = new fXmlRpc\Client(
'http://endpoint.com',
null,
new fXmlRpc\Parser\NativeParser(),
new fXmlRpc\Serializer\NativeSerializer()
);
$client->call('remoteMethod', array('arg1', true));
$client = new fXmlRpc\Client('http://endpoint.com');
$client->prependParams(array('username', 'password'));
$client->appendParams(array('appended'));
...
$proxy = new fXmlRpc\Proxy(new fXmlRpc\Client('http://endpoint.com'));
// Call system.echo
$proxy->system->echo('Hello World!');
$transport = new fXmlRpc\Transport\HttpAdapterTransport(...);
$recorder = new Recorder($transport);
$client = new Client('http://foo.com', $recorder);
$client->call('TestMethod', ['param1', 2, ['param3' => true]]);
$lastRequest = $recorder->getLastRequest();
$lastResponse = $recorder->getLastResponse();