A PHP JSON-RPC client/server implementation compatible with both JSON-RPC 1.0 and 2.0.
PHP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
JsonRpcClient.php
JsonRpcServer.php
LICENSE
README.md
composer.json

README.md

php-json-rpc

A PHP JSON-RPC client/server implementation compatible with JSON-RPC 1.0 and 2.0

Example client usage

require_once('JsonRpcClient.php');

$car = new JsonRpcClient('http://username:password@address:port/');

try {
	$car->drive()
}
catch (Exception $e) { 
    echo $e->getMessage();
}

Example server usage

require_once('JsonRpcServer.php');

class Car {
	function drive() {
		// do something
	}
}

$server = new Car();

JsonRpcServer::handle($server);

License

Distributed under the MIT license.