PHP code example of blackcube / lockbot
1. Go to this page and download the library: Download blackcube/lockbot 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/ */
blackcube / lockbot example snippets
php
// $solution is the solution provided by the user ['salt' => 'challenge_salt', 'hash' => 'challenge_hash', 'algorithm' => 'challenge_algorithm', 'solution' => 'user_solution']
use blackcube\lockbot\Captcha;
$captcha = new Captcha(
algorithm: $solution['algorithm'] // Use the same algorithm as the challenge);
);
$isValid = $captcha->verifySolution($solution['salt'], $solution['hash'], $solution['solution']); // Verify the provided solution