PHP code example of vperyod / simple-lock

1. Go to this page and download the library: Download vperyod/simple-lock 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/ */

    

vperyod / simple-lock example snippets


use Vperyod\SimpleLock\LockHandler;
use Vperyod\SimpleLock\Verify\Password;

if ($_ENV['LOCK']) {
    $password    = new Password($_ENV['LOCK_PW']); // Password Verifier
    $lockHandler = new LockHandler($password);     // Lock Handler Middleware
    $stack->middleware($lockHandler);              // Add middleware early
}