getQRCodeGoogleUrl('www.yundou.com', $secret); ? //Google Charts接口 生成的二维码。php通过谷歌身份验证实现动态口令( 二 )。" />

php通过谷歌身份验证实现动态口令( 二 )

?

//第一个参数是"标识",第二个参数为"安全密匙SecretKey" 生成二维码信息

$qrCodeUrl = $ga->getQRCodeGoogleUrl('www.yundou.com', $secret);

?

//Google Charts接口 生成的二维码图片,方便手机端扫描绑定安全密匙SecretKey

echo "Google Charts URL for the QR-Code: " . $qrCodeUrl . "\n\n";

?

输出:

安全密匙SecretKey: M5X3M4PGBQRFPUTY

?

Google Charts URL for the QR-Code: https://api.qrserver.com/v1/create-qr-code/?data=http://www.veick.cn/news/otpauth%3A%2F%2Ftotp%2Fwww.yundou.com%3Fsecret%3DM5X3M4PGBQRFPUTY&size=200x200&ecc=M

?

绑定手机方式(可以使用谷歌身份验证器或者FreeOTP)

推荐阅读