edrard / curl
Small Curl library with Multicurl and Retrying
1.0.2
2019-07-30 11:37 UTC
Requires
- php: >=5.4
- ext-curl: *
This package is auto-updated.
Last update: 2024-09-23 21:40:23 UTC
README
Small Curl library with Multicurl
Simple Example
$urls[] = 'https://microsoft.com';
$urls[] = 'https://google.com';
$curl = new edrard\Curl\Curl();
$curl->setSleep(function($retry){
return ceil($retry/50);
});
//Adding Urls
foreach($urls as $key => $link){
$curl->addSession( $link, $key );
}
// In $tmp we have result
$tmp = $curl->exec();