PHP code example of datto / json-rpc-ssh
1. Go to this page and download the library: Download datto/json-rpc-ssh 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-ssh example snippets
$client = new Client($destination, $command, $options);
$client->query(1, 'add', array(1, 2));
$reply = $client->send(); // array('jsonrpc' => '2.0', 'id' => 1, 'result' => 3)
$translator = new Translator();
$server = new Server($translator);
$server->reply();
php examples/client.php