1. Go to this page and download the library: Download kodhe/xmlrpc 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/ */
kodhe / xmlrpc example snippets
declare(strict_types=1);
use Kodhe\Framework\Xmlrpc\Xmlrpc;
$rpc = new Xmlrpc();
$rpc->server('https://example.com/xmlrpc.php', 443);
$rpc->method('wp.getPostFormats');
$rpc->request([
['postId' => 1, 'username' => 'admin', 'password' => 'rahasia'],
]);
if ($rpc->send_request() !== false) {
print_r($rpc->display_response()); // array hasil dekode
} else {
echo $rpc->display_error(); // fault string
}