1. Go to this page and download the library: Download kriosa-ai/kriosa-php 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/ */
kriosa-ai / kriosa-php example snippets
$kriosa = new Kriosa('sk_your_api_key');
$kriosa->protect();
kriosa_protect('sk_your_api_key');
// In app/Http/Middleware/KriosaMiddleware.php
namespace App\Http\Middleware;
use Closure;
use Kriosa;
class KriosaMiddleware
{
public function handle($request, Closure $next)
{
$kriosa = new Kriosa(config('services.kriosa.key'));
$kriosa->protect();
return $next($request);
}
}