PHP code example of edrard / curl

1. Go to this page and download the library: Download edrard/curl library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

edrard / curl example snippets


$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();