脚本宝典收集整理的这篇文章主要介绍了七牛刷新接口php实现参考,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
「接口文档」(http://developer.qiniu.com/ar...)
<?php
require_once '../autoload.php';
use QiniuAuth;
use QiniuHttpClient;
$accessKey = 'accesskey';
$secretKey = 'secretkey';
$auth = new Auth($accessKey, $secretKey);
function fusion(Auth $auth, $method, array $data = array())
{
var_dump(json_encode($data));
$headers = $auth->authorization('http://fusion.qiniuapi.com/' . $method);
$headers['Content-Type'] = 'application/json';
$res = Client::post('http://fusion.qiniuapi.com/' . $method, json_encode($data), $headers);
var_dump($headers);
var_dump($res);
}
$urls = array(
//'http://misc.rrcimg.com/dist/pc/js/search/search-a01198d1.js',
'http://itisatest.qiniudn.com/aaa/bbb/sss',
);
$dirs = array(
'http://itisatest.qiniudn.com/aaa/bbb/',
'http://itisatest.qiniudn.com/ccc/ddd/',
);
$data = array(
'urls' => $urls,
//'dirs' => $dirs,
);
fusion($auth, 'v2/tune/refresh', $data);
以上是脚本宝典为你收集整理的七牛刷新接口php实现参考全部内容,希望文章能够帮你解决七牛刷新接口php实现参考所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。