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

?

$checkResult = $ga->verifyCode($secret, $oneCode, 2);

?

?

if ($checkResult) {

//这里添加自定义逻辑

echo '匹配! OK';

} else {

echo '匹配! FAILED';

}

?

https://github.com/PHPGangsta/GoogleAuthenticator

推荐阅读