1. Go to this page and download the library: Download trifs/jsonrpc 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/ */
trifs / jsonrpc example snippets
{
" "trifs/jsonrpc": "dev-master"
}
}
$client = new trifs\jsonrpc\Client('http://example.com');
$client->request('method-one')
->send();
$client = new trifs\jsonrpc\Client('http://example.com');
$client->notification('method-one')
->send();
$client = new trifs\jsonrpc\Client('http://example.com');
$client->request('method-one')
->request('method-two')
->notification('method-three')
->send();
$client = new trifs\jsonrpc\Client(
'http://example.com',
['timeout' => 5, ]
);