Learning Diary: php two factor authentication , 学习笔记, PHP 2次验证
Hello Steemit friends, so I was studying how to integrating two factor authentication to my website, luckily it is very simple
first go to the github project located below
https://github.com/Voronenko/PHPOTP
then click "Clone or Download" then download the zip file into your computer, then unzip it and transfer the file to your web hosting via FTP
As you can see from the screenshot , actually there are only 3 file, and one of them is the example file, so after you put all 3 file into your webhosting you can open up the example.php and see what its look like
so the code below is very self explainary
- You put your secret key into the script
- The last row print out the QR code, you can use your google authenticator to scan the QR code and get the correct code every 30 seconds
- The if then else is the checking if the code is correct, so you can just integrate this code into your website and it was done
thanks for reading
大家好,最近学习如何把2次验证放入网站,好采很简单
首先去GITHUB
https://github.com/Voronenko/PHPOTP
然后按"Clone or Download"下载到电脑,extract后把代码FTP到你的网站
其实只有3个文件,其中一个还是Example,打开Example.php就一目了然了
主要是
1。把secret key放入
2。最后一排代码会把QR code放出去,那你就能用手机的Google Authenticator来scan,每30秒就会给你一个有效的code
3。If then else就是来查验code正不正确,把代码放入网站就大功告成了
谢谢阅读
Realy leme try
I visit you web. This is very easy factors authentication. Perfect solution
你好!客官渴不渴,有没有去 @laodr 老道茶馆喝口热茶啊?假如我的留言打扰到你,请回复“取消”。
You've been upvoted by TeamMalaysia community. Here are trending posts by other TeamMalaysia authors at http://steemit.com/trending/teammalaysia
To support the growth of TeamMalaysia Follow our upvotes by using steemauto.com and follow trail of @myach
Vote TeamMalaysia witness bitrocker2020 using this link vote for witness
@fundurian keep carry on nice content that help us...
power of open source.... really easy to coding nowadays (subjective off course XD)