$arr = array(
'Action' => 'ProcessFile',
'fileId' => $fileid,
'notifyMode'=>'Finish',
'transcode.definition.0'=>'210',
'transcode.definition.1'=>'220',
'transcode.definition.2'=>'230',
'transcode.drm.definition'=>10,
'Nonce' => $nonce,
'Region' => 'bj',
'SecretId' => $secret_id,
'Timestamp' => $current,
// 'Version': '2017-03-12',
);
$sign = sign($arr,$secret_key);
echo $str = "https://vod.api.qcloud.com/v2/index.php?fileId=".$fileid."&transcode.definition.0=210&transcode.definition.1=220&transcode.definition.2=230&transcode.drm.definition=10¬ifyMode=Finish&Action=ProcessFile&Region=bj&SecretId=".$secret_id."&Nonce=".$nonce."&Timestamp=".$current."&Signature=".$sign;
function sign($arr,$secret_key)
{
$url = "GETvod.api.qcloud.com/v2/index.php?";
if($arr)
{
ksort($arr);
foreach($arr as $k=>$v)
{
$sr .= "&".$k."" . "=" .$v;
}
$sr = $url.substr($sr,1);
$signStr = base64_encode(hash_hmac('sha1', $sr, $secret_key, true));
//echo $arr = implode('&',$arr);
}
return $signStr;
}
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。