PHP library for ArCaptcha

v1.0.2 2021-08-08 11:55 UTC

This package is auto-updated.

Last update: 2022-09-21 21:31:36 UTC


Latest Stable Version Total Downloads Latest Unstable Version Build Status License

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

List of contents


Require this package with composer:

composer require mohammadv184/arcaptcha


You can create a new instance by passing the SiteKey and SecretKey from your API. You can get that at

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" />

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!";



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