nextpertise/jsonrpcclient-php

JsonRPC v1 client written in PHP.

dev-master 2017-06-27 15:55 UTC

This package is not auto-updated.

Last update: 2024-10-26 19:26:20 UTC


README

JsonRPC v1 client written in PHP

Installing

The easiest way to install jsonrpcclient-php is to use Composer, the awesome dependency manager for PHP. Once Composer is installed, run composer.phar require nextpertise/jsonrpcclient-php:dev-master and composer will do all the hard work for you.

Use

require 'vendor/autoload.php';

use JsonRpcClient\JsonRpcClient;

$jsonrpc = new JsonRpcClient();
$jsonrpc->setHost('127.0.0.1');
$jsonrpc->setPort(3000);
$jsonrpc->setPrefix('test.');
$jsonrpc->setReconnect(true);
$jsonrpc->setDebug(true);

$call = "";
try {
    $call = $jsonrpc->Test(7, 8);
} catch (Exception $e) {
    print_r($e);
    exit(1);
}
echo "Succes\n";
print_r($call);
exit(0);