PHPackages                             fightbulc/jsonrpc\_curl - 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. fightbulc/jsonrpc\_curl

ActiveLibrary[API Development](/categories/api)

fightbulc/jsonrpc\_curl
=======================

JSON-RPC CURL

0.5.4(13y ago)071.9kMITPHPPHP &gt;=5.3.3

Since Mar 4Pushed 13y agoCompare

[ Source](https://github.com/fightbulc/jsonrpc_curl)[ Packagist](https://packagist.org/packages/fightbulc/jsonrpc_curl)[ Docs](https://github.com/fightbulc/jsonrpc_curl)[ RSS](/packages/fightbulc-jsonrpc-curl/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

```
::::::'##::'######:::'#######::'##::: ##:'########::'########:::'######::
:::::: ##:'##... ##:'##.... ##: ###:: ##: ##.... ##: ##.... ##:'##... ##:
:::::: ##: ##:::..:: ##:::: ##: ####: ##: ##:::: ##: ##:::: ##: ##:::..::
:::::: ##:. ######:: ##:::: ##: ## ## ##: ########:: ########:: ##:::::::
'##::: ##::..... ##: ##:::: ##: ##. ####: ##.. ##::: ##.....::: ##:::::::
 ##::: ##:'##::: ##: ##:::: ##: ##:. ###: ##::. ##:: ##:::::::: ##::: ##:
. ######::. ######::. #######:: ##::. ##: ##:::. ##: ##::::::::. ######::
:......::::......::::.......:::..::::..::..:::::..::..::::::::::......:::
:'######::'##::::'##:'########::'##:::::::
'##... ##: ##:::: ##: ##.... ##: ##:::::::
 ##:::..:: ##:::: ##: ##:::: ##: ##:::::::
 ##::::::: ##:::: ##: ########:: ##:::::::
 ##::::::: ##:::: ##: ##.. ##::: ##:::::::
 ##::: ##: ##:::: ##: ##::. ##:: ##:::::::
. ######::. #######:: ##:::. ##: ########:
:......::::.......:::..:::::..::........::
```

JSON-RPC CURL
=============

[](#json-rpc-curl)

A tiny JSON-RPC client which works perfectly with [Simplon/Jr](https://github.com/fightbulc/simplon_jr) - a JSON-RPC server.

1. Installation
---------------

[](#1-installation)

You can install JSONRPC CURL either via package download from github or via [Composer](http://getcomposer.org) install. I encourage you to do the latter:

```
{
  "require": {
    "fightbulc/jsonrpc_curl": "0.5.2"
  }
}
```

2. How to use?
--------------

[](#2-how-to-use)

If you are new to the topic of JSON-RPC I would suggest you to jump over to [Simplon/Jr's documentation](https://github.com/fightbulc/simplon_jr/README.md) which explains the whole topic. Go ahead I will wait here...

Got it? Cool!

The following code examples should help you understand how to use the client. First off, we need `load composer's autoloader`. Secondly, since we require a JSON-RPC server lets assume that our server resides under the following URL:

```
// load autoloader
require __DIR__ . '/vendor/autoload.php';       // set correct composer vendor path

// set url for server
$urlServiceGateway = 'http://localhost/jsonrpc/';
```

### 2.1. Request without data

[](#21-request-without-data)

Sending an request without data:

```
// send request without parameters
$response = (new JsonRpcCurl())
  ->setUrl($urlServiceGateway . '/api/web/')    // server url with gateway path
  ->setId(1)                                    // request ID (important for batch/async)
  ->setMethod('Web.Base.helloWorld')            // requested service
  ->send();                                     // send request

// dump response
var_dump($response);
```

### 2.2. Request with data

[](#22-request-with-data)

Data are passed via an assoc. array:

```
// set data
$data = [
  'address'  => 'Mr.',
  'lastname' => 'Putterschmidt',
];

// send request without parameters
$response = (new JsonRpcCurl())
  ->setUrl($urlServiceGateway . '/api/web/')    // server url with gateway path
  ->setId(1)                                    // request ID (important for batch/async)
  ->setMethod('Web.Family.guy')                 // requested service
  ->setData($data)                              // holds data
  ->send();                                     // send request

// dump response
var_dump($response);
```

### 2.3. Proxy a request

[](#23-proxy-a-request)

In development I am using [Charles](http://www.charlesproxy.com/) to see all communication between server and client. The following example shows how to enable a proxy:

```
// proxy
$proxyIp = '127.0.0.1';
$proxyPort = 88;

// set data
$data = [
  'message'  => 'Can I get a what whaaaat?',
];

// send request without parameters
$response = (new JsonRpcCurl())
  ->setUrl($urlServiceGateway . '/api/web/')    // server url with gateway path
  ->setId(1)                                    // request ID (important for batch/async)
  ->setMethod('Web.Cheerleader.cheer')          // requested service
  ->setData($data)                              // holds data
  ->setProxy($proxyIp, $proxyPort)              // enable proxy
  ->send();                                     // send request

// dump response
var_dump($response);
```

### 3. Conclusion

[](#3-conclusion)

That's pretty much all there is. Cheers!

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~17 days

Total

5

Last Release

4752d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/451061?v=4)[Tino Ehrich](/maintainers/fightbulc)[@fightbulc](https://github.com/fightbulc)

---

Tags

json-rpc client

### Embed Badge

![Health badge](/badges/fightbulc-jsonrpc-curl/health.svg)

```
[![Health](https://phpackages.com/badges/fightbulc-jsonrpc-curl/health.svg)](https://phpackages.com/packages/fightbulc-jsonrpc-curl)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
