PHP code example of flamestorm / jsonrpc

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

    

flamestorm / jsonrpc example snippets



$client = new JsonRpc\Client($url);
$client->call('method', array($param1, $param2));

// now do something with $client->result


// MethodsClass contains the exposed methods
$methods = new MethodsClass();

$server = new JsonRpc\Server($methods);
$server->receive();