https://github.com/phphleb/ucaptcha
Universal captcha for smart people vs stupid robots
https://github.com/phphleb/ucaptcha
Last synced: about 1 year ago
JSON representation
Universal captcha for smart people vs stupid robots
- Host: GitHub
- URL: https://github.com/phphleb/ucaptcha
- Owner: phphleb
- License: mit
- Created: 2021-04-27T19:34:18.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-12-06T01:40:17.000Z (over 1 year ago)
- Last Synced: 2025-03-24T16:41:09.920Z (about 1 year ago)
- Language: PHP
- Size: 6.59 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
UCaptcha
=====================
 [-brightgreen.svg)](https://github.com/phphleb/hleb/blob/master/LICENSE)



## Universal Captcha
Install using Composer:
```bash
$ composer require phphleb/ucaptcha
```
-----------------------------------------
Шаг первый. Создание изображения (отображает PNG).
Step one. Image creation (displays PNG).
```php
(new \Phphleb\Ucaptcha\Captcha())->createImage(\Phphleb\Ucaptcha\Captcha::TYPE_BASE);
```
-----------------------------------------
Шаг второй. Проверка кода, введённого пользователем.
Step two. Checking the code entered by the user.
```php
if ((new \Phphleb\Ucaptcha\Captcha())->check($code)) {
// Characters entered correctly.
} else {
// Invalid characters.
};
```
-----------------------------------------
Проверка успешного прохождения капчи за текущую пользовательскую сессию.
Checking the successful completion of the captcha for the current user session.
```php
if ((new \Phphleb\Ucaptcha\Captcha())->isPassed()) {
// The captcha has already been completed earlier.
}
```