quanwei
2025-11-21 2d9362ae6f528f57e6133d5d80f0b633c24e8eb6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
 
$SDK_VERSION = "1";
 
function getToken($appid, $appcertificate, $account, $validTimeInSeconds){
    global $SDK_VERSION;
    $expiredTime = time() + $validTimeInSeconds;
 
    $token_items = array();
    array_push($token_items, $SDK_VERSION);
    array_push($token_items, $appid);
    array_push($token_items, $expiredTime);
    array_push($token_items, md5($account.$appid.$appcertificate.$expiredTime));
    return join(":", $token_items);
}
 
?>