Download the PHP package pepsia/rolling-curl without Composer
On this page you can find all versions of the php package pepsia/rolling-curl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pepsia/rolling-curl
More information about pepsia/rolling-curl
Files in pepsia/rolling-curl
Package rolling-curl
Short Description A non blocking multi thread cURL library
License MIT
Homepage https://github.com/PEPSIASAS/RollingCurl
Informations about the package rolling-curl
RollingCurlService
A non blocking multi thread cURL library
Overview
curl_multi() makes it possible to handle multiple HTTP requests in parallel in PHP.
RollingCurl is a specific implementation of curl_multi() that prevents from executing a whole stack of requests at once and having to wait for the slowest response.
RollingCurl starts by executing only a portion of a request stack and adding a new request each time a request has completed, while other requests are still running.
Features of this implementation:
- Add custom data to a request. This data is then available when a request has completed (e.g. the original url, or an ID)
- Set custom cURL options for all requests
- Add custom cURL options to the global options for a single request or replace the global options by custom options for a single request
- Write request response to file (local or distant using FTP)
- Custom rollingWindow (number of parallel requests)
Installation (via composer)
Get composer and add this in your requires section of the composer.json:
and then
Usage
Basic Example
Write request output to file
Setting custom curl options
For every request
For a single request:
All versions of rolling-curl with dependencies
ext-curl Version *
lib-curl Version *