1
This commit is contained in:
parent
7a2fffcd04
commit
d6f53dd8db
@ -10,7 +10,7 @@ class VoiceController{
|
||||
'port' => $mysql_conf['port'],
|
||||
'user' => $mysql_conf['user'],
|
||||
'passwd' => $mysql_conf['passwd'],
|
||||
'dbname' => 'gamedb2001_' . $mysql_conf['instance_id']
|
||||
'dbname' => 'gamedb2002_' . $mysql_conf['instance_id']
|
||||
));
|
||||
return $conn;
|
||||
}
|
||||
@ -32,18 +32,18 @@ class VoiceController{
|
||||
$data = base64_encode($raw_data);
|
||||
$md5 = md5($data);
|
||||
$r = $this->getRedis($md5);
|
||||
$r->set('game2001:voice:' . $md5, $data);
|
||||
$r->set('game2002:voice:' . $md5, $data);
|
||||
echo json_encode(array(
|
||||
'errcode' => 0,
|
||||
'errmsg' => '',
|
||||
'download_url' => "https://game2001api.kingsome.cn/webapp/index.php?c=Voice&a=download&res_id=" . $md5
|
||||
'download_url' => "https://game2002api.kingsome.cn/webapp/index.php?c=Voice&a=download&res_id=" . $md5
|
||||
));
|
||||
}
|
||||
|
||||
public function download()
|
||||
{
|
||||
$r = $this->getRedis($_REQUEST['res_id']);
|
||||
$data = $r->get('game2001:voice:' . $_REQUEST['res_id']);
|
||||
$data = $r->get('game2002:voice:' . $_REQUEST['res_id']);
|
||||
echo base64_decode($data);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user