PHPackages                             steven-williams/curl-easy - 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. steven-williams/curl-easy

ActiveLibrary

steven-williams/curl-easy
=========================

cURL wrapper for PHP. Supports parallel and non-blocking requests. For high speed crawling, see stil/curl-robot.

v1.2.1(8y ago)07MITPHP

Since Aug 27Pushed 6y agoCompare

[ Source](https://github.com/StevenWilliams/curl-easy)[ Packagist](https://packagist.org/packages/steven-williams/curl-easy)[ RSS](/packages/steven-williams-curl-easy/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (2)Versions (12)Used By (0)

[![Travis](https://camo.githubusercontent.com/4757180ed87a2c1b0a75d13168d24b9a115af790c9bab9badb128aa6cb35cfd8/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7374696c2f6375726c2d656173792e737667)](https://travis-ci.org/stil/curl-easy)[![Latest Stable Version](https://camo.githubusercontent.com/c60c7c568c33515bc9329a38e0d1e9ad08d9d27059aba2edf3f231508ae4e7e2/68747470733a2f2f706f7365722e707567782e6f72672f7374696c2f6375726c2d656173792f762f737461626c65)](https://packagist.org/packages/stil/curl-easy) [![Total Downloads](https://camo.githubusercontent.com/0561127c62ce52d12d5dd56ae8e76dd138cc2fb94aeb2876f470cabce78fdf87/68747470733a2f2f706f7365722e707567782e6f72672f7374696c2f6375726c2d656173792f646f776e6c6f616473)](https://packagist.org/packages/stil/curl-easy) [![License](https://camo.githubusercontent.com/3b66d97f15750fddca86201a7b69722171999969a40a0a12090dfc73a9aaeb52/68747470733a2f2f706f7365722e707567782e6f72672f7374696c2f6375726c2d656173792f6c6963656e7365)](https://packagist.org/packages/stil/curl-easy)

Table of contents
=================

[](#table-of-contents)

- [Introduction](#introduction)
    - [Description](#description)
    - [Main Features](#main-features)
- [Installation](#installation)
- [Examples](#examples)
- [cURL\\Request](#curlrequest)
    - [Request::\_\_construct](#request__construct)
    - [Request::getOptions](#requestgetoptions)
    - [Request::setOptions](#requestsetoptions)
    - [Request::getContent](#requestgetcontent)
    - [Request::getInfo](#requestgetinfo)
    - [Request::send](#requestsend)
- [cURL\\RequestQueue](#curlrequestqueue)
    - [RequestsQueue::\_\_construct](#requestsqueue__construct)
    - [RequestsQueue::getDefaultOptions](#requestsqueuegetdefaultoptions)
    - [RequestsQueue::setDefaultOptions](#requestsqueuesetdefaultoptions)
    - [RequestsQueue::socketPerform](#requestsqueuesocketperform)
    - [RequestsQueue::socketSelect](#requestsqueuesocketselect)
    - [RequestsQueue::send](#requestsqueuesend)
- [cURL\\Options](#curloptions)
    - [Options::set](#optionsset)
    - [Options::toArray](#optionstoarray)

Introduction
------------

[](#introduction)

### Description

[](#description)

This is small but powerful and robust library which speeds the things up. If you are tired of using PHP cURL extension with its procedural interface, but you want also keep control about script execution - it's great choice for you! If you need high speed crawling in your project, you might be interested in stil/curl-easy extension - [stil/curl-robot](https://github.com/stil/curl-robot).

### Main features

[](#main-features)

- widely unit tested.
- lightweight library with moderate level interface. It's not all-in-one library.
- parallel/asynchronous connections with very simple interface.
- attaching/detaching requests in parallel on run time!
- support for callbacks, so you can control execution process.
- intelligent setters as alternative to CURLOPT\_\* constants.
- if you know the cURL php extension, you don't have to learn things from beginning

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

[](#installation)

In order to use cURL-PHP library you need to install the » libcurl package.

Install this library as [Composer](http://getcomposer.org) package with following command:

```
composer require stil/curl-easy
```

Examples
--------

[](#examples)

### Single blocking request

[](#single-blocking-request)

```
