PHPackages                             hindmost/rolling-curl-mini - 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. hindmost/rolling-curl-mini

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

hindmost/rolling-curl-mini
==========================

1.0.6(11y ago)16287PHPPHP &gt;=5.0.0

Since Dec 11Pushed 10y ago6 watchersCompare

[ Source](https://github.com/hindmost/rolling-curl-mini)[ Packagist](https://packagist.org/packages/hindmost/rolling-curl-mini)[ RSS](/packages/hindmost-rolling-curl-mini/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (3)Used By (0)

Rolling Curl Mini
=================

[](#rolling-curl-mini)

Rolling Curl Mini is a fork of [Rolling Curl](http://code.google.com/p/rolling-curl/). It allows to process multiple HTTP requests in parallel using cURL PHP library.

For more information read [this article](http://savreen.com/mnogopotochnyj-sbor-dannyx-s-ispolzovaniem-cepochek-svyazannyx-curl-zaprosov-chast-1/) (in russian).

Basic Usage Sample
------------------

[](#basic-usage-sample)

```
...
require "RollingCurlMini.php";
...
$o_mc = new RollingCurlMini(10);
...
$o_mc->add($url, $postdata, $callback, $userdata, $options, $headers);
...
$o_mc->execute();
...
```

Callbacks
---------

[](#callbacks)

Any request may have an individual callback - function/method to be called as this request is completed. Callback accepts 4 parameters and may look like the following one:

```
/**
 * @param string $content - content of request response
 * @param string $url - URL of requested resource
 * @param array $info - cURL handle info
 * @param mixed $userdata - user-defined data passed with add() method
 */
function request_callback($content, $url, $info, $userdata) {
}
```

License
-------

[](#license)

- [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)

Rolling Scraper Abstract
========================

[](#rolling-scraper-abstract)

Rolling Scraper Abstract is a multipurpose scraping (crawling) framework which uses facilities of multi-curl and RollingCurlMini class. It is a base PHP class which implement common functionality of a multi-curl scraper. Particular functionality should be implemented in derived classes. Particular scraper class should extend RollingScraperAbstract class and implement (override) two mandatory methods: \_initPages and \_handlePage.

For more information read [this article](http://savreen.com/karkas-mnogopotochnogo-parsera-primenenie-na-primere-parsinga-imdb-top-250/) (in russian).

[Example](https://github.com/hindmost/rolling-scraper-example-imdb)

Basic Usage Sample
------------------

[](#basic-usage-sample-1)

```
class MyScraper extends RollingScraperAbstract
{
    ...
    public function __construct() {
        ...
        $this->modConfig(array(
            'state_time_storage' => '...', // temporal section of state storage (file path)
            'state_data_storage' => '...', // data section of state storage (file path)
            'scrape_life' => 0, // expiration time (secs) of scraped data
            'run_timeout' => 30, // max. time (secs) to execute scraper script
            'run_pages_loops' => 20, // max. number of loops through pages
            'run_pages_buffer' => 500, // page requests buffer size
            'curl_threads' => 10, // number of multi-curl threads
            'curl_options' => array(...), // CURL options used in multi-curl requests
        ));
        parent::__construct();
    }

    /**
     * Initialize the starting list of page requests
     */
    protected function _initPages() {
        ...
        // add page request. $url - page URL
        $this->addPage($url);
        ...
    }

    /**
     * Process response of a page request
     * @param string $cont - page content
     * @param string $url - url of request
     * @param array $aInfo - CURL info data
     * @param int $index - # of page request
     * @param array $aData - custom request data (part of request data)
     * @return bool
     */
    protected function _handlePage($cont, $url, $aInfo, $index, $aData) {
        ...
    }
    ...
}

$scraper = new MyScraper();
$bool = $scraper->run();
list($time_start, $time_end, , $time_run_start, , $n_pages_total, $n_pages_passed) =
    $scraper->getStateProgress();
if ($time_end) {
    echo sprintf('Completed at %s', date('Y.m.d, H:i:s', $time_end));
}
else {
    if ($bool)
        echo sprintf('In progress: %d/%d pages', $n_pages_passed, $n_pages_total);
    else
        echo 'Cancelled since another script instance is still running';
}
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

4130d ago

### Community

Maintainers

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

### Embed Badge

![Health badge](/badges/hindmost-rolling-curl-mini/health.svg)

```
[![Health](https://phpackages.com/badges/hindmost-rolling-curl-mini/health.svg)](https://phpackages.com/packages/hindmost-rolling-curl-mini)
```

###  Alternatives

[friendsofsymfony/rest-bundle

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

2.8k73.3M319](/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.8M293](/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)
