peterfrench/yii2-curl 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-06