peterfrench/yii2-curl
最新稳定版本:1.0.5
Composer 安装命令:
composer require peterfrench/yii2-curl
包简介
A Yii2 component extension for cURL.
关键字:
README 文档
README
Requirements
- PHP 5.4+
- Yii 2.0.x
- Curl and php-curl installed
Setup instructions
The preferred way to install this extension is through composer.
php composer.phar require --prefer-dist peterfrench/yii2-curl "*"
Once composer installs the extension, include the component in your config file.
'curl' => [ 'class' => 'peterfrench\curl\Curl', 'options' => [ /* curl options */ ], ],
Usage
- to GET a page with default params
$output = Yii::$app->curl->get($url, $params); // output will contain the result of the query // $params - query that'll be appended to the url
- to POST data to a page
$output = Yii::$app->curl->post($url, $data); // $data - data that will be POSTed
统计信息
- 总下载量: 285
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-04-06