1. Go to this page and download the library: Download jalendport/craft-altcha library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jalendport / craft-altcha example snippets
use Craft;
use jalendport\altcha\events\VerifyCommentEvent;
use jalendport\altcha\integrations\Comments;
use yii\base\Event;
Event::on(
Comments::class,
Comments::EVENT_BEFORE_VERIFY_COMMENT,
function(VerifyCommentEvent $event) {
if (Craft::$app->getUser()->getIdentity()) {
$event->skipVerification = true;
}
},
);