Simple universal class for using Curl library
use \dellirom\Curl;
$curl = new Curl();
$curl->execute('http://domain.com');
$curl->set('option', 'value')->execute('http://domen.com');
$curl->set('option', 'value')->set('option', 'value')->execute('http://domain.com');
$curl->post(['name'=>'value'])->execute('http://domen.com');
$curl->header(['Content-type: application/x-www-form-urlencoded'])->post(['name'=>'value'])->execute('http://domain.com');
$curl->auth_http('login:password')->execute('http://domain.com);
$curl->auth($auth_post_data, $cookie_file)->execute('http://domain.com');
$curl->getCode();