Giter Site home page Giter Site logo

rivergao87 / antiboter-php-html-chinese Goto Github PK

View Code? Open in Web Editor NEW

This project forked from plbin97/antiboter-php-html-chinese

0.0 0.0 0.0 289 KB

一个漂亮的拼图人机验证,后端PHP,前端HTML

License: Mozilla Public License 2.0

JavaScript 61.89% PHP 25.19% CSS 12.92%

antiboter-php-html-chinese's Introduction

Antiboter PHP-HTML版本

Antiboter是一个界面漂亮且方便使用的PHP后台的图片人机验证

Antiboter不依赖于任何前端框架 (不需要导入jQure,react或者bootstrap)

原生JS搭建的前端

支持PC键鼠以及移动端的触控屏验证

演示

https://www.teenet.me/verification

后端环境

php 5 +

php-gd

如何使用

首先,下载Release里面的ZIP包.

然后,复制里面的东西到你的PHP路径里

按照主页index.php文件里面的指引,复制其中的代码到你的页面上

在你的PHP后端:

Antiboter会使用一个Session变量 $_SESSION["anti_bot_verified"]

这个变量是一个布朗型的变量(true和false)。用户请求的数据提交到后台之后,如果这个变量为true,那么人机验证通过。反之,如果为false,说明人机验证未通过。

例子:

    
          session_start();
          if(isset($_SESSION["anti_bot_verified"])) {
              if($_SESSION["anti_bot_verified"]) {
                  echo "Verified";
              } else {
                  echo "Not verified";
              }
          }
    

关于显示的图片

你可以放你自己的jpg图片在文件夹:anti-bot-verification/img/

在这个文件夹的图片中,文件名必须是以这种格式:1.jpg, 2.jpg, 3.jpg 等等

图片的大小必须是宽300px,高200px (300*200)

注意

不要使用任何以anti_bot开头的变量名

antiboter-php-html-chinese's People

Contributors

plbin97 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.