21 lines
553 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
require('../../vendor/autoload.php');
use Volc\Service\Vod\Vod;
$client = Vod::getInstance();
// call below method if you dont set ak and sk in /.vcloud/config
// $client->setAccessKey($ak);
// $client->setSecretKey($sk);
$expire = 60; // 请求的签名有效期
echo "\nSTS2鉴权签名\n";
$space = "";
$response = $client->getUploadVideoAuthWithExpiredTime($expire);
echo json_encode($response);
echo "\nSTS2鉴权签名过期时间默认1小时\n";
$vid = "";
$response = $client->getUploadVideoAuth();
echo json_encode($response);