library chinanetcdn
chinanetcdn
eddy/chinanetcdn
chinanetcdn
- Wednesday, March 29, 2017
- by eddy8
- Repository
- 1 Watchers
- 0 Stars
- 8 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 0 % Grown
网宿科技CDN SDK, (*1)
说明
网宿科技CDN API参考手册(登录客户服务系统后可下载对应文档):http://www.chinanetcenter.com/, (*2)
http 请求使用 Guzzle 三方库(v5.3),具体文档可参考:https://github.com/guzzle/guzzle, (*3)
安装
composer require eddy/chinanetcdn
使用方法
// 实例化客户端
$client = new eddy\ChinaNetCDNClient('username', 'password');
// 发送请求
// 任务查询
$response = $client->queryReceiver([
'starttime' => date('Y-m-d H:i:s', strtotime('-6 days')),//开始时间
'endtime' => date('Y-m-d H:i:s'),//结束时间
]);
$response = $client->contReceiver();
// 更新
$response = $client->contReceiver(
[
'url' => 'http://www.pc6.com/azyx/142394.html;http://www.pc6.com/azyx/203556.html',//url地址。多个url用分号相隔
'dir' => 'http://www.pc6.com/azyx/',//目录地址
]
);
if ($response !== false) {
// http 请求返回内容
echo $response->getBody();
// http 响应状态码
echo $response->getStatusCode();
}
dev-master
9999999-dev
chinanetcdn
Sources
Download
MIT
The Requires
by
Eddy
php
cdn
sdk
chinanetcdn
wangsu
1.0.1
1.0.1.0
chinanetcdn
Sources
Download
MIT
The Requires
by
Eddy
php
cdn
sdk
chinanetcdn
wangsu
1.0.0
1.0.0.0
chinanetcdn
Sources
Download
MIT
The Requires
by
Eddy
php
cdn
sdk
chinanetcdn
wangsu