academy01/simple-captcha

Simple php package to generate and validate captcha.

v1.0.0 2023-09-16 13:25 UTC

This package is auto-updated.

Last update: 2024-09-16 16:18:56 UTC


README

Simple package to generate and validate captcha in php

Installation

just add Captcha.php to your project

require 'Captcha.php';

Usage

use Academy01\Captcha\Captcha;

generate new captcha in html code.

<img src="<?php echo Captcha::generate(); ?>">

validate captcha

$captcha = $_POST['captcha'];
Captcha::validate($captcha); // TRUE or FALSE

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT