Home >Backend Development >PHP Tutorial >Drag-and-drop graphic verification implemented in PHP, simple and easy to use!

Drag-and-drop graphic verification implemented in PHP, simple and easy to use!

藏色散人
藏色散人forward
2022-07-31 15:06:053900browse

I recently saw some posts about drag-and-drop verification codes. Out of curiosity and an attitude of research and learning, I simply implemented the first version of drag-and-drop verification

Project address: github.com/RLOFLS/drag-captcha

Example

Drag-and-drop graphic verification implemented in PHP, simple and easy to use!

Logic:

Drag-and-drop graphic verification implemented in PHP, simple and easy to use!

##api

    ##php Drag
    • generate()
    • Generate rendering datadst, front
    • verify()
    • Verify matching results
  • js Drag
    • matchFunc()
    • Implement user drag trigger matching
    • render()
    • Render drag interface
    • matchSuccess()
    • Set the matching success style
    • matchFail()
    • Set the matching failure style
    • destroy()
    • Destroy the drag and drop interface
  • composer:
composer require rlofls/drag-captcha

Original address: https://learnku. com/articles/69652

The above is the detailed content of Drag-and-drop graphic verification implemented in PHP, simple and easy to use!. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:learnku.com. If there is any infringement, please contact admin@php.cn delete