PHPackages                             max13/rest-manager - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. max13/rest-manager

ActiveLibrary[HTTP &amp; Networking](/categories/http)

max13/rest-manager
==================

REST request manager for PHP, using php-curl and aiming at being light and really really really easy to use. Ah BTW, did I mention that it's really easy to use ?

v1.0-p8(9y ago)72121CC-BY-NC-SA-3.0PHPPHP &gt;=5.3.0

Since Nov 11Pushed 9y ago3 watchersCompare

[ Source](https://github.com/Max13/MXRequestManager-PHP)[ Packagist](https://packagist.org/packages/max13/rest-manager)[ Docs](http://github.com/Max13/MXRequestManager-PHP)[ RSS](/packages/max13-rest-manager/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (10)Used By (1)

MXRequestManager-PHP
====================

[](#mxrequestmanager-php)

Note
----

[](#note)

This is an old README, when the lib wasn't installable by composer. I'm on it, there are only some changes related to autoload,

Required
--------

[](#required)

- PHP &gt;= `5.3`
- php-curl (with SSL if required)
- APIs which return `JSON` encoded data (More structures are coming)
- Brain &gt;= `Working`

How to download
---------------

[](#how-to-download)

There are several ways to download **MxRequestManager-PHP**:

- Install with composer (`"max13/rest-manager": "dev-master"`)
- Clone the [github repository](https://github.com/Max13/MXRequestManager-PHP) with `git clone  []`
- Download the zip file on [github](https://github.com/Max13/MXRequestManager-PHP) directly
- Try to find another one by yourself :/

Then place it where you want (readable location, in order to load it).

How to use
----------

[](#how-to-use)

Captain Obvious is so Obvious, that this is truly the most interesting part of the README.

You can find a Doxygen doc somewhere, you'll just see how to basically use the library.

First of all, let's take a simple example. You have your APIs (`api.awsome-guy.com`) and you want to retrieve a member list from your **users** resource, with a **GET**.

JSON string would be:

```
{
	users:[
		{
			"id": 4,
			"username": "foo"
		}, {
			"id": 12,
			"username": "bar"
		}
	]
}

```

```

```

From there, you must verify `$res` because it can be 3 types (so check the type too with `===`)

```
// MXRequestManager error,
// errno are in the top of the lib file
if ($res === FALSE)
	die('Client error: '.$mx->errno());
if ($res === TRUE) // No JSON, may be a PHP Error
	die('Parse error: '.$mx->response('body'));

```

And after that and your own checks (for example, if the property `errors` is present), you can safely use $res as a `stdClass`:

```

```

And this example will output:

```
User n0: 4
4 / foo
12 / bar

```

That's it. You can already use `MXRequestManager` !

How to check the entire response ?
----------------------------------

[](#how-to-check-the-entire-response-)

This is simple, you can call:

```

```

How to check the headers ?
--------------------------

[](#how-to-check-the-headers-)

`MXRequestManager` is intelligent and smart enough to allow you to check the headers simply.

Here is an example header:

```
HTTP/1.1 200 OK
Server: nginx
Date: Mon, 04 Feb 2013 21:49:22 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.3.21
Content-Encoding: gzip
Vary: Accept-Encoding

```

When processed, every line are split and stored in an array, accessible by a key, corresponding to the part before the semicolon (`:`) of each line, except for the first line which has for key `Status` and the `HTTP code` accessible with in `Code`.

There is an internal multi-dimentional array which contains 2 root keys: `headers` and `body`:

- `headers` contains an associative array of the header's values
- `body` is the body returned as a `string`

Nothing better than an example:

```

```

Additional notes
----------------

[](#additional-notes)

A sort of manual will come soon...

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~138 days

Recently: every ~208 days

Total

8

Last Release

3599d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/531249?v=4)[Adnan RIHAN](/maintainers/Max13)[@Max13](https://github.com/Max13)

---

Top Contributors

[![Max13](https://avatars.githubusercontent.com/u/531249?v=4)](https://github.com/Max13 "Max13 (37 commits)")

---

Tags

jsonapilaravelrest

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/max13-rest-manager/health.svg)

```
[![Health](https://phpackages.com/badges/max13-rest-manager/health.svg)](https://phpackages.com/packages/max13-rest-manager)
```

###  Alternatives

[chrisbjr/api-guard

A simple way of authenticating your APIs with API keys using Laravel

698375.6k5](/packages/chrisbjr-api-guard)[givebutter/laravel-keyable

Add API keys to your Laravel models

187144.5k2](/packages/givebutter-laravel-keyable)[guanguans/laravel-api-response

Normalize and standardize Laravel API response data structure. - 规范化和标准化 Laravel API 响应数据结构。

485.6k](/packages/guanguans-laravel-api-response)

PHPackages © 2026

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