flankerspb/curl
最新稳定版本:1.0.3
Composer 安装命令:
composer require flankerspb/curl
包简介
Simple cURL wrapper
关键字:
README 文档
README
Simple cURL wrapper
Installation
php composer.phar require --prefer-dist flankerspb/curl
Usage
$curl = new \fl\curl\Curl([ CURLOPT_TIMEOUT => 10, CURLOPT_CONNECTTIMEOUT => 5, CURLOPT_FOLLOWLOCATION => true, CURLOPT_AUTOREFERER => true, ]); $responseGet = $curl ->setQuery([ 'key1' => 'value', 'key2' => 'value', ]) ->get('https://www.site.com/'); $responsePost = $curl ->setBody([ 'key1' => 'value', 'key2' => 'value', ], true) ->post('https://site.com/');
$curl = new \fl\curl\Curl(); $curl ->setHeader('key', 'value') ->setCookie('key', 'value') ->setProxy('socks5://user:pass@1.1.1.1:1080') ; $response = new class() implements \fl\curl\ResponseInterface { public function init($handle, array $options) : void { // TODO: Implement init() method. } }; $curl->get('https://www.site.com/', $response);
统计信息
- 总下载量: 77
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2022-08-11