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 creating both json-rpc clients and servers
- Fully automated or fully manual, fine-grained encoding and decoding from PHP values to json-rpc
- Support for UTF8, Latin-1 and ASCII character encodings. With the PHP mbstring extension enabled, even more character sets are supported
- 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/
- Other cool features are delivered with extra packages, such as a json-rpc server that automatically generates html documentation of exposed webservices
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; 7.4 or later recommended
- The "phpxmlrpc/phpxmlrpc" PHP package, version 4.10.1 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-beta2 released on April. 15, 2024 (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.
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/5