PHPackages                             maurice2k/multicurl - 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. maurice2k/multicurl

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

maurice2k/multicurl
===================

Object-oriented asynchronous multi-curl wrapper

2.0.8(1mo ago)420.4k↓41%3MITPHPPHP &gt;=8.1

Since May 20Pushed 9mo ago1 watchersCompare

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

READMEChangelog (6)Dependencies (4)Versions (18)Used By (0)

maurice2k/multicurl
===================

[](#maurice2kmulticurl)

`Maurice\Multicurl` provides a powerful, easy-to-use object-oriented interface for PHP's `curl_multi_*` functions, enabling high-performance concurrent HTTP requests with automatic connection management.

Beyond being just a wrapper, it includes a complete event loop system that intelligently manages concurrent connections, enforces connection limits, and handles both connection and total timeouts automatically.

Key Components
--------------

[](#key-components)

**`Manager`** - Orchestrates multiple channels, handling the event loop and connection concurrency automatically.

**`HttpChannel`** - The primary class you'll use for making HTTP requests. It provides a clean, fluent API for GET/POST requests, authentication, headers, redirects, and more.

**Specialized Channels:**

- **`McpChannel`** - Implements a "Streamable HTTP" client for the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/specification/2025-03-26) for AI model communication
- **`SseChannel`** - Handles [Server-Sent Events](https://html.spec.whatwg.org/multipage/server-sent-events.html) for real-time streaming

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

[](#installation)

Install with composer:

```
$ composer require maurice2k/multicurl
```

Compatibility
-------------

[](#compatibility)

`Maurice\Multicurl` requires PHP 8.1 (or better) with the curl extension enabled.

Usage
-----

[](#usage)

### Basic example

[](#basic-example)

```
