PHPackages                             stefangabos/zebra\_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. [HTTP &amp; Networking](/categories/http)
4. /
5. stefangabos/zebra\_curl

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

stefangabos/zebra\_curl
=======================

A high performance solution for making multiple HTTP requests concurrently, asynchronously from your PHP projects using cURL

1.7.0(1y ago)21971.3k↓26.8%64[1 issues](https://github.com/stefangabos/Zebra_cURL/issues)2LGPL-3.0PHPPHP &gt;=5.3.0

Since Nov 14Pushed 1y ago25 watchersCompare

[ Source](https://github.com/stefangabos/Zebra_cURL)[ Packagist](https://packagist.org/packages/stefangabos/zebra_curl)[ Docs](https://github.com/stefangabos/Zebra_cURL)[ GitHub Sponsors](https://github.com/stefangabos)[ RSS](/packages/stefangabos-zebra-curl/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (20)Used By (2)

[![zebra-curl-logo](https://github.com/stefangabos/zebrajs/raw/master/docs/images/logo.png)](https://github.com/stefangabos/zebrajs/blob/master/docs/images/logo.png)

Zebra cURL [![Tweet](https://camo.githubusercontent.com/cb820a0ecc9645168e33b03925d7f14691262ddbaeaf66a0a91697803d0cba2d/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c2f687474702f736869656c64732e696f2e7376673f7374796c653d736f6369616c)](https://twitter.com/intent/tweet?text=A+high+performance+solution+for+making+multiple+HTTP+requests+concurrently,+asynchronously+from+your+PHP+projects+using+cURL&url=https://github.com/stefangabos/Zebra_cURL&via=stefangabos&hashtags=php,curl)
=====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#zebra-curl-)

*A high-performance solution for making HTTP requests from your PHP projects. It allows running of multiple requests concurrently, asynchronously, supports GET, POST, HEADER, PUT, PATCH, and DELETE requests, and offers support for caching, FTP downloads, HTTP authentication and proxy requests.*

[![Latest Stable Version](https://camo.githubusercontent.com/4b08ca94a8a0da9058820a4940a229814e284b545aa8b0c18246f9e11b72d8ac/68747470733a2f2f706f7365722e707567782e6f72672f73746566616e6761626f732f7a656272615f6375726c2f762f737461626c65)](https://packagist.org/packages/stefangabos/zebra_curl) [![Total Downloads](https://camo.githubusercontent.com/e63dc092e215e32f59051eab9bb4ea555a5bd80b635a304cb001c1448e46e234/68747470733a2f2f706f7365722e707567782e6f72672f73746566616e6761626f732f7a656272615f6375726c2f646f776e6c6f616473)](https://packagist.org/packages/stefangabos/zebra_curl) [![Monthly Downloads](https://camo.githubusercontent.com/11de74fe76c8cb3ebf27d0385cfa6ef8a4f92817938a762cd1170af710d32317/68747470733a2f2f706f7365722e707567782e6f72672f73746566616e6761626f732f7a656272615f6375726c2f642f6d6f6e74686c79)](https://packagist.org/packages/stefangabos/zebra_curl) [![Daily Downloads](https://camo.githubusercontent.com/5df8dcb7c06059e0dcab4f6fab81512f56fbbb24a7fbfb045ad21b286a5e8be0/68747470733a2f2f706f7365722e707567782e6f72672f73746566616e6761626f732f7a656272615f6375726c2f642f6461696c79)](https://packagist.org/packages/stefangabos/zebra_curl) [![License](https://camo.githubusercontent.com/5376111981ce60c3d6e72203d7ff457d10b2bcb7808403e75523ee5468ef9d8c/68747470733a2f2f706f7365722e707567782e6f72672f73746566616e6761626f732f7a656272615f6375726c2f6c6963656e7365)](https://packagist.org/packages/stefangabos/zebra_curl)

**Zebra cURL** is a high performance cURL PHP library which not only allows the running of multiple asynchronous requests at once, but also finished threads can be processed right away without having to wait for the other threads in the queue to finish.

Also, each time a request is completed another one is added to the queue, thus keeping a constant number of threads running at all times and eliminating wasted CPU cycles from busy waiting. This result is a faster and more efficient way of processing large quantities of cURL requests (like fetching thousands of RSS feeds at once), drastically reducing processing time.

This script supports GET (with caching), POST, HEADER, PUT, PATCH and DELETE requests, basic downloads as well as downloads from FTP servers, HTTP Authentication, and requests made through proxy servers.

For maximum efficiency downloads are streamed (bytes downloaded are directly written to disk) removing the unnecessary strain from the server of having to read files into memory first, and then writing them to disk.

The code is heavily commented and generates no warnings/errors/notices when PHP's error reporting level is set to [E\_ALL](https://www.php.net/manual/en/function.error-reporting.php).

Features
--------

[](#features)

- supports GET (with caching), POST, HEADER, PUT, PATCH and DELETE requests, basic downloads as well as downloads from FTP servers, HTTP Authentication, and requests through proxy servers
- allows the running of multiple requests at once, asynchronously, and as soon as one thread finishes it can be processed right away without having to wait for the other threads in the queue to finish
- downloads are streamed (bytes downloaded are directly written to disk) removing the unnecessary strain from the server of having to read files into memory first, and then writing them to disk
- provides detailed information about the made requests
- has [awesome documentation](https://stefangabos.github.io/Zebra_cURL/Zebra_cURL/Zebra_cURL.html)
- code is heavily commented and generates no warnings/errors/notices when PHP's error reporting level is set to [E\_ALL](https://www.php.net/manual/en/function.error-reporting.php)

📔 Documentation
---------------

[](#notebook_with_decorative_cover-documentation)

Check out the [awesome documentation](https://stefangabos.github.io/Zebra_cURL/Zebra_cURL/Zebra_cURL.html)!

🎂 Support the development of this project
-----------------------------------------

[](#-support-the-development-of-this-project)

Your support is greatly appreciated and it keeps me motivated continue working on open source projects. If you enjoy this project please star it by clicking on the star button at the top of the page. If you're feeling generous, you can also buy me a coffee through PayPal or become a sponsor. **Thank you for your support!** 🎉

[![Star it on GitHub](https://camo.githubusercontent.com/09be5e9963b8f2105c76530b1071a6c6550e584a77811a1522a77c0829816af8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f73746566616e6761626f732f7a656272615f6375726c3f636f6c6f723d677265656e266c6162656c3d7374617225323069742532306f6e253230476974487562)](https://github.com/stefangabos/Zebra_cURL) [![Donate](https://camo.githubusercontent.com/604e3db9c8751116b3f765aad0353ec7ded655bbe8aaacbc38d8c4a6b784b3ed/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d677265656e2e737667)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W6MCFT65DRN64) [![](https://camo.githubusercontent.com/7a6725dd6857bfabaca4b6783ac9ff3c2e882456681b5fdfb1fae916c0461c73/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2d53706f6e736f722d6661666266633f6c6f676f3d47697448756225323053706f6e736f7273)](https://github.com/sponsors/stefangabos)

Requirements
------------

[](#requirements)

PHP 5.3.0+ with the [cURL extension](https://www.php.net/manual/en/curl.installation.php) enabled.

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

[](#installation)

You can install via [Composer](https://packagist.org/packages/stefangabos/zebra_curl)

```
# get the latest stable release
composer require stefangabos/zebra_curl

# get the latest commit
composer require stefangabos/zebra_curl:dev-master
```

Or you can install it manually by downloading the latest version, unpacking it, and then including it in your project

```
require_once 'path/to/Zebra_cURL.php';
```

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

[](#how-to-use)

**Scrape a page**

```
