Introduction
Welcome to the homepage of "JSON-RPC for PHP". It is a library implementing the JSON-RPC
    protocol, written in PHP. It is also known as PHPJSONRPC.
    It is designed for ease of use, flexibility and completeness. High speed and reduced memory footprint are not the main
    goals of the project.
JSON-RPC is a format used for achieving remote procedure calls via JSON using HTTP as the transport. JSON-RPC has its own website, https://www.jsonrpc.org/
Main Features
- Support for JSON-RPC version 1.0 and 2.0 over HTTP, including Notifications and batch calls
- Support for creating both JSON-RPC clients and servers
- Support for http features including compression of both requests and responses, cookies, proxies, basic and digest auth, ntlm auth, https, http2, keepalives (some only with the PHP cURL extension)
- Possibility to register existing PHP function or class methods as webservices, extracting value-added information from phpdoc comments, including code-generation capabilities
- Optional validation in the server of parameter types of incoming json-rpc request
- A web based visual debugger is included with the library. It is also available as self-contained Container from https://github.com/gggeek/phpxmlrpc-debugger/
- Not in the JSON-RPC spec, but inherited from the XML-RPC codebase: support for methods `system.listMethods`, `system.methodHelp`, `system.methodSignature`, `system.getCapabilities` and `system.multicall`
- Support for UTF8, Latin-1 and ASCII character encodings. With the PHP mbstring extension enabled, even more character sets are supported
- Fully automated or fully manual, fine-grained encoding and decoding from PHP values to json-rpc
- Other cool features are delivered with the "extras", package such as json-rpc server that automatically generates html documentation of exposed webservices
Not (yet?) implemented
- socket communications - both the provided Client and Server classes only work over HTTP
- `__jsonclass__` class hinting for JSON-RPC 1.0
- JSON-RPC 1.0 bi-directional communications, ie. requests and notifications sent from the Server to the Client
Requirements
The library has been designed with goals of flexibility and backward compatibility. As such, it supports a wide range of PHP installs. Note that not all features of the lib are available in every configuration.
- PHP 5.4.0 or later; 8.0 or later recommended
- The "phpxmlrpc/phpxmlrpc" PHP package, version 4.11.4 or later. This is normally automatically pulled in via Composer
- the PHP "curl" extension is needed if you wish to use HTTPS, HTTP 1.1 or HTTP2 to communicate with remote servers or to use NTLM/Digest authentication
- the PHP "mbstring" extension is needed to allow reception of requests/responses in character sets other than ASCII, Latin-1, UTF-8
Download
For the latest release, check out the Releases page on GitHub.
License
Use of this software is subject to the terms in the license.txt file (BSD License).
News
The latest stable release is version 1.0.0 released on Oct. 30, 2025 (Release notes)
Documentation
API manual
Automatically generated API docs are available online.
    A good way to get started with API usage is to take a look at the demo source code,
    showcasing both Client and Server use cases.
PHPXMLRPC user manual
The PHPXMLRPC library, which this library extends, comes with an extended user manual. Many of the concepts exposed in it also apply to the JSON-RPC codebase. It can be viewed online or downloaded in pdf format from GitHub
Release Notes
The description of changes in each release is available as part of the distribution. It is also accessible online.
Changelogs
Detailed changelogs are available on GitHub for all releases
    starting with 1.0-alpha.
Online demo server
TBD...
Online json-rpc debugger
TBD...
Support
JSON-RPC for PHP is offered "as-is" without any warranty or commitment to support. However, informal advice and help is available via the JSON-RPC for PHP website.
Online Support
Bugs, feature requests and patches can be posted to the project's development website.
Contact
For security related issues feel free to contact ggiunta at users.sourceforge.netDevelopment
Source code, bug tracker, pull requests, releases are all managed on GitHub
Roadmap
See the list of issues on Github
Page last updated: 2025/10/30