PHP code example of datto / json-rpc-http

1. Go to this page and download the library: Download datto/json-rpc-http 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/ */

    

datto / json-rpc-http example snippets


$client = new Client('http://api.example.com');

$client->query(1, 'add', array(1, 2));

$reply = $client->send();

$api = new Api();

$server = new Server($api);

$server->reply();