mikuni-labo/curly
Composer 安装命令:
composer require mikuni-labo/curly
包简介
This library is Manipulate the Curl library for PHP.
README 文档
README
This library is Manipulate the Curl library for PHP.
Installation
With Composer
$ composer require mikuni-labo/curly
{
"require": {
"mikuni-labo/curly": "^1.0.0"
}
}
Example
<?php require 'vendor/autoload.php'; use MikuniLabo\Curly\Curly; $ch = new Curly; $ch->init(); $ch->setUrl('http://example.com/');// Request URL $ch->setMethod('GET'); // Request Method $ch->setUserPwd('auth-basic-user-id', 'auth-basic-password');// Auth Basic Credentials $ch->setHeaderFromArray(array( // Header 'Content-type: application/json', // More any parameter... )); $ch->setParameterFromArray(array( // Request Parameter 'key' => 'value', // More any parameter... )); $ch->setJsonTransfer(true); $response = $ch->exec(); $ch->close(); print_r( $response );
统计信息
- 总下载量: 619
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-04-30