File "cdn_get_log_list.php"
Full Path: /www/wwwroot/shphe-en.com/admin/extend/vendor/qiniu/php-sdk/examples/cdn_get_log_list.php
File size: 658 bytes
MIME-type: --
Charset: utf-8
<?php
require_once __DIR__ . '/../autoload.php';
use \Qiniu\Cdn\CdnManager;
$accessKey = getenv('QINIU_ACCESS_KEY');
$secretKey = getenv('QINIU_SECRET_KEY');
$auth = new Qiniu\Auth($accessKey, $secretKey);
$cdnManager = new CdnManager($auth);
$domains = array(
"javasdk.qiniudn.com",
"phpsdk.qiniudn.com"
);
$logDate = '2017-08-20';
//获取日志下载链接
//参考文档:http://developer.qiniu.com/article/fusion/api/log.html
list($logListData, $getLogErr) = $cdnManager->getCdnLogList($domains, $logDate);
if ($getLogErr != null) {
var_dump($getLogErr);
} else {
echo "get cdn log list success\n";
print_r($logListData);
}