composer
composer require tanchengjin/curl
TanChengjin\Curl\Curl::request($url, $https = false, $post = false, array $data = []);
chain 链式方法
$curl=new TanChengjin\Curl\Curl();
#get
$curl->setUrl(url)->setHttps()->get();
or
$curl->get(url,$https=true);
#post
$curl->setUrl(url)->setHttps()->post();
or
$curl->post(url,true,[postData]);