An open API service indexing awesome lists of open source software.

https://github.com/choval/reactphp-curl-proc

Async Curl library for ReactPHP.
https://github.com/choval/reactphp-curl-proc

async cookies curl php reactphp

Last synced: about 13 hours ago
JSON representation

Async Curl library for ReactPHP.

Awesome Lists containing this project

README

          

## reactphp-curl-proc

**WARNING: THIS IS NOT PRODUCTION READY**

Async Curl library for ReactPHP.
This library uses the curl binary of the system.

### Rationale

[HttpClient](https://github.com/reactphp/http-client) and [BuzzBrowser](https://github.com/clue/reactphp-buzz/) are not capable of handling cookies and/or large file uploads.

### Installation

```
composer require choval/reactphp-curl-proc:dev-master
```

### Usage

```
use choval\React\Curl;
use choval\React\CurlResponse;

$loop = React\EventLoop\Factory::create();
$curl = new Curl($loop);

$curl->get('http://google.com/')
->then(function(CurlResponse $resp) {
echo $resp->getBody();
})
->otherwise(function(Exception $e) {
echo 'ERROR: '.$e->getMessage().PHP_EOL;
});
```