PHPackages                             xxtime/curl-utils - 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. xxtime/curl-utils

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

xxtime/curl-utils
=================

curl multi for spider and more

0.2.2(6y ago)0421PHPPHP &gt;=5.5

Since Sep 14Pushed 6y ago1 watchersCompare

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

READMEChangelog (4)DependenciesVersions (5)Used By (0)

CurlUtils
=========

[](#curlutils)

curl multi for spider and more

Install
-------

[](#install)

```
composer require xxtime/curl-utils
```

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

[](#how-to-use-it)

```
use Xxtime\CurlUtils\CurlUtils
$curlUtils = new CurlUtils();

// get method
$curlUtils->get('https://www.xxtime.com');

// post method
$curlUtils->post('https://www.xxtime.com', ['title' => 'XT curlUtils']);

// set custom curl options
$curlUtils->setOptions([
    "CURLOPT_TIMEOUT"   => 20,
    "CURLOPT_USERAGENT" => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36'
]);
```

Use for multi request
---------------------

[](#use-for-multi-request)

```
use Xxtime\CurlUtils\CurlUtils

class Demo{

    protected $curlUtils;

    public function run(){
        $this->curlUtils = new CurlUtils();
        $this->curlUtils->setOptions([
            "CURLOPT_USERAGENT" => 'Mozilla/5.0 (Macintosh; Intel Mac OS X)',
        ]);

        $urls = [
            'https://www.xxtime.com',
        ];
        $this->curlUtils->add(
            $urls,                  // urls
            null,                   // set custom curl options for every url
            [$this, 'callback'],    // callback function
            ['depth' => 5]          // custom argv will be use in callback function
        );
        $this->curlUtils->run();
    }

    public function callback($content, $header, $argv){
        // do something

        // no Content-Type then ignore
        if (empty($header['Content-Type'])) {
            return false;
        }

        // not a html page, save content or ignore
        if (strpos($header['Content-Type'], 'text/html' === false)) {
            return true;
        }

        // limit the request depth
        if ($argv['depth'] == 0) {
            return true;
        }

        // analysis the html content
        // continue to add new tasks into the task pool
        $options = ["CURLOPT_REFERER" => $header['url']];
        $this->curlUtils->add(
            $urls,
            $options,
            [$this, 'callback'],
            ['depth' => $argv['depth'] - 1]
        );
    }
}
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

Total

4

Last Release

2371d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d98ca75291ed585ef10c792c72d0da28ae541c80e172f123acaf35f0aacd9b5?d=identicon)[zlab](/maintainers/zlab)

### Embed Badge

![Health badge](/badges/xxtime-curl-utils/health.svg)

```
[![Health](https://phpackages.com/badges/xxtime-curl-utils/health.svg)](https://phpackages.com/packages/xxtime-curl-utils)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M317](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M292](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

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

78126.4M414](/packages/react-http)

PHPackages © 2026

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