php curl operation

v2.0.0 2020-04-16 05:23 UTC

This package is auto-updated.

Last update: 2024-05-16 15:20:22 UTC


README

install 安装

composer

composer require tanchengjin/curl

using 使用

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]);