Home > php教程 > php手册 > JiVerification Code Installation and Deployment Tutorial

JiVerification Code Installation and Deployment Tutorial

WBOY
Release: 2016-09-30 09:23:12
Original
1902 people have browsed it

As the Internet plays an increasingly important role in people’s lives, Internet security issues have also begun to become important.

The black Internet industry chain is the most powerful enemy in the field of Internet security.

I believe everyone knows something about black products, so how exactly do black products operate and make profits? You can check the picture below~

So, protecting account security is the first step to fight against black industry! The verification code is an important way to ensure account security!

Traditional verification codes not only bring a very poor experience to users, but also begin to be unable to resist malicious attacks by hackers in terms of security! Therefore, new verification codes with high security and good user experience are what we need!

Currently on the market, I think the widely praised "Ji Verification Code" is very good~

You can experience their demo:

http://www.geetest.com/exp_normal

Jixian provides SDK, which can be integrated into our official website for free. Let me explain the installation method in detail~

1、DownloadSDK

https://github.com/GeeTeam/gt-php-sdk

2, background registration application ID and Key

https://user.geetest.com/email/register

3. Import the class.geetestlib.php file into your project

You can choose to deploy the JiVerification verification code on the PC terminal or mobile terminal.

If you choose PC side deployment, replace the strings after CAPTCHA_ID and PRIVATE_KEY with your own ID and Key registered in the background.

If deployed on the mobile side, replace the strings after MOBILE_CAPTCHA_ID and MOBILE_PRIVATE_KEY with the ID and Key registered in the background.

4.In the verification part, execute the verification logic through the following code (taking PHP language as an example)

<span style="color: #008080;">1</span> <?<span style="color: #000000;">php
</span><span style="color: #008080;">2</span>  <span style="color: #0000ff;">require_once</span>('geetestlib.php');<span style="color: #008000;">/*</span><span style="color: #008000;"> 注意路径必须要正确 </span><span style="color: #008000;">*/</span>
<span style="color: #008080;">3</span> <span style="color: #800080;">$validate_result</span>=geetest_validate(@<span style="color: #800080;">$_POST</span>['geetest_challenge'], @<span style="color: #800080;">$_POST</span>['geetest_validate'],@<span style="color: #800080;">$_POST</span>['geetest_seccode']); <span style="color: #0000ff;">if</span>(<span style="color: #800080;">$validate_result</span><span style="color: #000000;">){ 
</span><span style="color: #008080;">4</span> <span style="color: #008000;">//</span><span style="color: #008000;"> 验证成功后的操作 </span>
<span style="color: #008080;">5</span> }<span style="color: #0000ff;">else</span><span style="color: #000000;"> { 
</span><span style="color: #008080;">6</span>     <span style="color: #008000;">//</span><span style="color: #008000;"> 验证失败后的操作 </span>
<span style="color: #008080;">7</span> } 
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template