Giter VIP home page Giter VIP logo

arcaptcha's Introduction

PHP ArCaptcha Library

Latest Stable Version Total Downloads Latest Unstable Version Build Status License

PHP library for ArCaptcha. This package supports PHP 7.3+.

List of contents

Installation

Require this package with composer:

composer require mohammadv184/arcaptcha

Configuration

You can create a new instance by passing the SiteKey and SecretKey from your API. You can get that at https://arcaptcha.ir/dashboard

use Mohammadv184\ArCaptcha\ArCaptcha;

$ArCaptcha = new ArCaptcha($siteKey, $secretKey);

How to use

How to use ArCaptcha.

Widget usage

To show the ArCaptcha on a form, use the class to render the script tag and the widget.

<?php echo $ArCaptcha->getScript() ?>
<form method="POST">
    <?php echo $ArCaptcha->getWidget() ?>
    <input type="submit" value="Submit" />
</form>

Verifying a response

After the post, use the class to verify the response. You get true or false back:

if ($ArCaptcha->verify($_POST["arcaptcha-token"])) {
    echo "OK!";
} else {
    echo "FAILED!";
}

Credits

License

The MIT License (MIT). Please see License File for more information.

arcaptcha's People

Contributors

dependabot[bot] avatar mohammadv184 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

arcaptcha's Issues

problem in laravel default Auth Controller

Hi guys,
I want to add arcaptcha to my own laravel project, in auth controller i got this error :
توکن ورود دیگر اعتبار ندارد
i want to add arcaptcha check in my credentials method in LoginController
``` $credentials = Arr::add($credentials, 'arcaptcha-token', 'arcaptcha');`

i want to know where is my mistake.

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.