PHPackages                             stk2k/grasshopper - 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. stk2k/grasshopper

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

stk2k/grasshopper
=================

Thin wrapper class library of cURL

0.8.1(8y ago)0107MITPHPPHP &gt;=5.4.0

Since Jan 4Pushed 8y ago1 watchersCompare

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

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

Grasshopper, PHP HTTP Multi Request Client
==========================================

[](#grasshopper-php-http-multi-request-client)

Description
-----------

[](#description)

Grasshopper is a yet another cURL PHP library wchich makes you easy to send HTTP request. This library can process multiple requests at once.

Feature
-------

[](#feature)

- supports process multiple requests in one call
- easy to use: simple interface
- variety of error handling: both supported procedural or callback

Demo
----

[](#demo)

```
use Grasshopper\Grasshopper;
use \Grasshopper\event\SuccessEvent;
use \Grasshopper\event\ErrorEvent;

$hopper = new Grasshopper();

$url = 'http://example.com';

$hopper->addRequest($url);

$result = $hopper->waitForAll();

$res = $result[$url];
if ( $res instanceof SuccessEvent ){
    // success
    $status = $res->getResponse()->getStatusCode();
    $body = $res->getResponse()->getBody();
    echo "success: status=$status" . PHP_EOL;
    echo $body . PHP_EOL;
}
elseif ( $res instanceof ErrorEvent ){
    // error
    echo "error: " . $res->getError()->getMessage() . PHP_EOL;
}

```

Usage
-----

[](#usage)

1. create grashopper object.
2. add HttpGet/HttpPostRequest to grasshopper object.
3. execute Grasshopper#waitforAll() method.
4. get response from returned array.the key is requested URL.
5. check response object whether SuccessEvent or ErrorEvent.SuccessEvent means request was succeeded, ErrorEvent means failure.
6. you can get response object from SuccessEvent. it provides status code and response body.
7. you can get error information from ErrorEvent. it provides error code and message.

Requirement
-----------

[](#requirement)

PHP 5.5 or later

Installing Grasshopper
----------------------

[](#installing-grasshopper)

The recommended way to install Grasshopper is through [Composer](http://getcomposer.org).

```
composer require stk2k/grasshopper
```

After installing, you need to require Composer's autoloader:

```
require 'vendor/autoload.php';
```

License
-------

[](#license)

[MIT](https://github.com/stk2k/grasshopper/blob/master/LICENSE)

Author
------

[](#author)

[stk2k](https://github.com/stk2k)

Disclaimer
----------

[](#disclaimer)

This software is no warranty.

We are not responsible for any results caused by the use of this software.

Please use the responsibility of the your self.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

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

Recently: every ~31 days

Total

53

Last Release

3027d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/955f3d564811dc5e1212c1a7a66bc4eb7e11ac166cc38600f244dc25f97d3ef4?d=identicon)[stk2k](/maintainers/stk2k)

---

Top Contributors

[![stk2k](https://avatars.githubusercontent.com/u/985640?v=4)](https://github.com/stk2k "stk2k (66 commits)")

---

Tags

curlphpcurl

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stk2k-grasshopper/health.svg)

```
[![Health](https://phpackages.com/badges/stk2k-grasshopper/health.svg)](https://phpackages.com/packages/stk2k-grasshopper)
```

###  Alternatives

[rmccue/requests

A HTTP library written in PHP, for human beings.

3.6k34.5M253](/packages/rmccue-requests)[kriswallsmith/buzz

Lightweight HTTP client

2.0k31.3M438](/packages/kriswallsmith-buzz)[nategood/httpful

A Readable, Chainable, REST friendly, PHP HTTP Client

1.8k17.2M266](/packages/nategood-httpful)[mashape/unirest-php

Unirest PHP

1.3k9.7M160](/packages/mashape-unirest-php)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48247.0M383](/packages/php-http-curl-client)[smi2/phpclickhouse

PHP ClickHouse Client

83510.1M71](/packages/smi2-phpclickhouse)

PHPackages © 2026

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