时间:2021-07-01 10:21:17 帮助过:23人阅读
def getVMS(tvid, vid):
t = int(time.time() * 1000)
key = 'd5fb4bd9d50c4be6948c97edd7254b0e'
sc = hashlib.new('md5', bytes(str(t) + key + vid, 'utf-8')).hexdigest()
return sc
def getVMS(tvid, vid):
t = int(time.time() * 1000)
key = 'd5fb4bd9d50c4be6948c97edd7254b0e'
sc = hashlib.new('md5', bytes(str(t) + key + vid, 'utf-8')).hexdigest()
return sc
完全直译啊
function getVMS($tvid, $vid) {
$t = floor(microtime(1) * 1000);
$key = 'd5fb4bd9d50c4be6948c97edd7254b0e';
$sc = md5($t . $key . $vid);
return $sc;
}
使用 floor
而不是 intval
是因为时间毫秒数超过了一个整型的最大范围