Download the PHP package bizonix/rolling-curl without Composer

On this page you can find all versions of the php package bizonix/rolling-curl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package rolling-curl

RollingCurl

A cURL library to fetch a large number of resources while maintaining a consistent number of simultaneous connections

Authors:

Overview

RollingCurl is a more efficient implementation of curl_multi().

curl_multi is a great way to process multiple HTTP requests in parallel in PHP but suffers from a few faults:

  1. The documentation for curl_multi is very obtuse and, as such, is easy to incorrectly or poorly implement
  2. Most curl_multi examples queue up all requests and execute them all at once

The second point is the most important one for two reasons:

  1. If you have to wait on every single request to complete, your program is "blocked" by the longest running request.
  2. More importantly, when you run a large number of cURL requests simultaneously you are, essentially, running a DOS attack. If you have to fetch hundreds or even thousands of URLs you're very likely to be blocked by automatic DOS systems. At best, you're not being a very respectful citizen of the internet.

RollingCurl deals with both issues by maintaining a maximum number of simultaneous requests and "rolling" new requests into the queue as existing requests complete. When requests complete, and while other requests are still running, RollingCurl can run an anonymous function to process the fetched result. (You have the option to skip the function and instead process all requests once they are done, should you prefer.)

Installation (via composer)

Get composer and add this in your requires section of the composer.json:

and then

Usage

Basic Example

Fetch A Very Large Number Of Pages

Let's scrape google for the first 500 links & titles for "curl"

Setting custom curl options

For every request

For a single request:

More examples can be found in the examples/ directory.

TODO:

Feel free to fork and pull request to help out with the above. :D

Similar Projects


All versions of rolling-curl with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
ext-curl Version *
lib-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bizonix/rolling-curl contains the following files

Loading the files please wait ....