PHPackages                             dan-da/json-rpc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. dan-da/json-rpc

ActiveLibrary[API Development](/categories/api)

dan-da/json-rpc
===============

Simple Json-RPC client/server library that just works

v1.3.2(6y ago)0471MITPHPPHP &gt;=5.4

Since Nov 22Pushed 6y agoCompare

[ Source](https://github.com/dan-da/JsonRPC)[ Packagist](https://packagist.org/packages/dan-da/json-rpc)[ Docs](https://github.com/dan-da/JsonRPC)[ RSS](/packages/dan-da-json-rpc/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (1)Versions (24)Used By (0)

JsonRPC PHP Client and Server
=============================

[](#jsonrpc-php-client-and-server)

A simple Json-RPC client/server that just works.

Complete fork of `fguillot/JsonRPC` with latest changes.

Features
--------

[](#features)

- JSON-RPC 2.0 only
- The server support batch requests and notifications
- Authentication and IP based client restrictions
- Custom Middleware
- Fully unit tested
- Requirements: PHP &gt;= 5.4
- License: MIT

This version forked by dan-da supports logging raw http requests/responses for debugging purposes and also returning unparsed json response to caller if desired.

Author
------

[](#author)

Frédéric Guillot

(This forked version modified by dan-da)

Installation with Composer
--------------------------

[](#installation-with-composer)

For PHP &gt;= 5.4

```
composer require dan-da/json-rpc
```

Running Test Cases -- Optional
------------------------------

[](#running-test-cases----optional)

- git clone
- cd JsonRPC
- composer install
- run vendor/bin/phpunit, eg:

```
$ vendor/bin/phpunit
PHPUnit 4.8.36 by Sebastian Bergmann and contributors.

................................................................. 65 / 94 ( 69%)
.............................

Time: 81 ms, Memory: 6.00MB

OK (94 tests, 127 assertions)
`

```

Examples
--------

[](#examples)

### Server

[](#server)

Callback binding:

```
