手机下载 authenticator
function generateCode($start=16,$end=50)
{
return (new \app\common\google\GoogleAuth())->model()->generate_code(rand($start, $end));
//return randomkey(rand($start, $start));
}
function captchaUrl($secret)
{
return (new \app\common\google\GoogleAuth())->model()->google_qrcode($secret);
}
1