PHPackages                             mateodioev/async-curl-requests - 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. mateodioev/async-curl-requests

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

mateodioev/async-curl-requests
==============================

Multi requests async with php

v1.0(4y ago)4443BSD-3-ClausePHPPHP &gt;=8.0.0

Since Apr 21Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Mateodioev/req-async)[ Packagist](https://packagist.org/packages/mateodioev/async-curl-requests)[ Docs](https://github.com/Mateodioev/req-async)[ RSS](/packages/mateodioev-async-curl-requests/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Async requests
==============

[](#async-requests)

[![CodeFactor](https://camo.githubusercontent.com/3e39a5759403c0ec9bca6403da5e6882ba878b175e0e668488439b36682c4c49/68747470733a2f2f7777772e636f6465666163746f722e696f2f7265706f7369746f72792f6769746875622f6d6174656f64696f65762f7265712d6173796e632f6261646765)](https://www.codefactor.io/repository/github/mateodioev/req-async)

Create new request
------------------

[](#create-new-request)

```
$req = new Req();
$promise = array();
$promise[] = $req::Get('https://httpbin.org/get'); // GET method
$promise[] = $req::Post('https://httpbin.org/post'); // POST method
$promise[] = $req::Put('https://httpbin.org/put'); // CUSTOM method
```

Run all request
---------------

[](#run-all-request)

```
$response = Run::Async($promise);
```

Proxy sintax
------------

[](#proxy-sintax)

```
# PROXY (http/s, socks4, socks5)
$server = [
    "METHOD" => "TUNNEL",
    "SERVER" => "ip:port"
];

# Windscribe
$server = [
    "METHOD" => "CUSTOM",
    "SERVER" = "socks5h://socks-us.windscribe.com:1080",
    "AUTH" => "w07l3gbt-r6vxdfpb:ucxqefrada3h"
];

# Webshare
$server = [
    "METHOD" => "CUSTOM",
    "SERVER" = "p.webshare.io:80",
    "AUTH" => "user-rotate:pass"
];

# APIFY valid syntax example
$server = [
    "METHOD" => "CUSTOM",
    "SERVER" = "http://proxy.apify.com:8000",
    "AUTH" => "auto:pasword"
];

# IPVANISH valid syntax example
$server = [
    "METHOD" => "CUSTOM",
    "SERVER" => "akl-c12.ipvanish.com:1080",
    "AUTH"   => "my_zone_customer_id:my_zone_customer_password"
];
```

Get sintax
----------

[](#get-sintax)

```
$headers = ['Origin: https://google.com/', 'MSG: testing'];
$server = ["METHOD" => "TUNNEL", "SERVER" => "ip:port"];

$req = new Req();
$promise = array();

$promise[] = $req::Get('https://httpbin.org/get');
$promise[] = $req::Get('https://httpbin.org/get', $headers); // Using headers
$promise[] = $req::Get('https://httpbin.org/cookies/set?name=John&age=25', $headers, null, 'file_example_cookie_file'); // Using headers and cookies
$promise[] = $req::Get('https://httpbin.org/get', null, $server); // Using only proxy

$response = Run::Async($promise); // Run all resquests
```

Post sintax
-----------

[](#post-sintax)

```
$headers = ['Origin: https://google.com/', 'MSG: testing'];
$server = ["METHOD" => "TUNNEL", "SERVER" => "ip:port"];
$post = ['name' => 'Jhon', 'age' => 25];

$req = new Req();
$promise = array();

$promise[] = $req::Post('https://httpbin.org/post'); // Simple resquest
$promise[] = $req::Post('https://httpbin.org/post', http_build_query($post)); // Post data
$promise[] = $req::Post('https://httpbin.org/post', $post); // Post (in json)
$promise[] = $req::Post('https://httpbin.org/post', $post, $headers); // Post (in json) and headers
$promise[] = $req::Post('https://httpbin.org/cookies/set?name=John&age=25', null, $headers, null, 'cookie_example'); // Using headers and cookies
```

Custom methods
--------------

[](#custom-methods)

```
$req = new Req();
$promise = array();

/**
 * Format:
 * $promise[] = $req::MethodName('url', $post_data, $headers, $server, $cookie_name);
 * $response = Run::Async($promise);
*/
$promise[] = $req::Put('https://httpbin.org/put');
$promise[] = $req::Patch('https://httpbin.org/patch');
$promise[] = $req::Delete('https://httpbin.org/delete');
```

Run requests
------------

[](#run-requests)

```
$req = new Req();
$promise = array();

for ($i=0; $i < 10; $i++) {
    $promise[] = $req::Get('https://httpbin.org/get');
}

$response = Run::Async($promise); // Run all resquests
$response = Run::Async([$promise[0], $promise[1]]); // Run someone resquests
$response = Run::Async($promise, 100); // Modified ms
```

Installation
------------

[](#installation)

### Install source from GitHub

[](#install-source-from-github)

To install the source code:

```
$ git clone https://github.com/Mateodioev/req-async.git

```

### Install from Composer

[](#install-from-composer)

```
$ composer require mateodioev/async-curl-requests:dev-master

```

And include it in your scripts:

```
require './vendor/autoload.php';
use Async\Req;
use Async\Run;
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% 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

Unknown

Total

1

Last Release

1480d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/77e3f2a5c4e98caf6e911141af3d18235c658500e8b9e0a95ec251a803a39676?d=identicon)[Mateodioev](/maintainers/Mateodioev)

---

Top Contributors

[![Mateodioev](https://avatars.githubusercontent.com/u/68271130?v=4)](https://github.com/Mateodioev "Mateodioev (10 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

httpasynccurl

### Embed Badge

![Health badge](/badges/mateodioev-async-curl-requests/health.svg)

```
[![Health](https://phpackages.com/badges/mateodioev-async-curl-requests/health.svg)](https://phpackages.com/packages/mateodioev-async-curl-requests)
```

###  Alternatives

[rmccue/requests

A HTTP library written in PHP, for human beings.

3.6k34.5M257](/packages/rmccue-requests)[nategood/httpful

A Readable, Chainable, REST friendly, PHP HTTP Client

1.8k17.2M267](/packages/nategood-httpful)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)[mashape/unirest-php

Unirest PHP

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

PSR-18 and HTTPlug Async client with cURL

48247.0M384](/packages/php-http-curl-client)[amphp/http-server

A non-blocking HTTP application server for PHP based on Amp.

1.3k4.5M81](/packages/amphp-http-server)

PHPackages © 2026

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