first236108/slide-capcha

a free slide picture capcha library.

Maintainers

Details

gitee.com/alexpan/slideCapcha.git

Installs: 152

Dependents: 0

Suggesters: 0

Security: 0

Language:CSS

v1.4 2020-07-14 06:58 UTC

This package is not auto-updated.

Last update: 2024-05-29 02:01:40 UTC


README

=============== Build Status PHP Version

description

slide capcha,it is free, as original author (weiyingbin) said that many verification code need charged. So, try this. This library is tncode's upgrade, thinks for weiyingbin, hope no infringement.

for install

composer require first236108/slide-capcha

document

for detail, please reference the example. Just need to pay attention, first, the API return data must include status field; and second, the format of picture is png; finally,the form handle is id, like this:

<form id="form1">
    <input type="text" name="">
    <!--……-->
    <button type="button" class="tncode"></button>
</form>

<script >
tncode.init({
        imageUrl: '/make.php',
        submit: '/login.php',
        form: 'form1',              //form handle
        method: 'post',
        success: 'ok',              //status
        onsuccess: function (res) {
            console.log(res);
            debugger;
            location.href = res.url;
        }
    });
</script>