Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/yaffle/multiget

Simultaneuos HTTP requests for PHP
https://github.com/yaffle/multiget

Last synced: about 1 month ago
JSON representation

Simultaneuos HTTP requests for PHP

Awesome Lists containing this project

README

        

MultiGet
========

Simultaneuos HTTP requests with curl_multi and PHP 5.3+

```php
$mget = new MultiGet();
$mget->request('http://ya.ru')
->on('success', function ($content) {
// this anonymous function will be called after request is loaded
// so you can process data before all other downloads ends
// also you can add new requests from here
});
$mget->go();// waits for downloads and executes callbacks
// at this point all work done...
```

Example
-------

see example.php