Giter Site home page Giter Site logo

yethandsome / image_drag_auth Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jobsfan/image_drag_auth

1.0 1.0 2.0 106 KB

php image drag auth plugin, php写的图片拖动验证插件,又名滑动验证

License: BSD 2-Clause "Simplified" License

PHP 100.00%

image_drag_auth's Introduction

image_drag_auth

php image drag auth plugin, php写的图片拖动验证插件

要求

用到了php GD库的imagecrop方法,此方法对php版本有要求(PHP 5 >= 5.5.0, PHP 7)

使用

直接down下来就可以使用了,根据自己的情况更换背景图,以及拖动区的形状[两张图,同样大小和形状,一个镂空,一个填充]

注意事项

图片拖动验证的本质是分步验证! 所以在调用validation方法的时候,需要传一个第二步验证的session名,默认session名是setpSession,在提交之后在你自己的后续逻辑里面需要对setpSession进行验证,验证成功之后需要及时把它设置unset掉,或者设置成false,否则就会形成第二次提交无需验证的漏洞。

应用Demo

zf3框架下的实现[结合redis,应对更高的并发] https://www.wendangs.com/api/imagedragauth/demo
yaf框架下也有实现[结合redis,应对更高的并发],不过是公司项目,不方便贴在这里

image_drag_auth's People

Contributors

jobsfan avatar yethandsome avatar

Stargazers

Felix's warehouse avatar

Watchers

James Cloos 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.