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.
- Host: GitHub
- URL: https://github.com/choval/reactphp-curl-proc
- Owner: choval
- Created: 2019-01-27T21:53:32.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-11T20:13:12.000Z (over 6 years ago)
- Last Synced: 2025-07-14T15:54:33.869Z (7 months ago)
- Topics: async, cookies, curl, php, reactphp
- Language: PHP
- Size: 26.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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;
});
```