carry0987/captcha

Generate Captcha with normal image format

1.1.3 2024-01-11 10:21 UTC

This package is auto-updated.

Last update: 2024-09-11 11:59:12 UTC


README

Latest Stable Version
Generate Captcha with normal image format via php

Installation

composer require carry0987/captcha

Usage

Set option for SimpleCaptcha:

$captcha_option = array(
    'code' => '',
    'image_height' => 60,
    'image_width' => 250,
    'captcha_letter' => 'bcdfghjkmnpqrstvwxyz23456789',
    'font_file' => dirname(__DIR__).'/font/monofont.ttf',
    'text_color' => '#142864',
    'noise_color' => '#142864',
    'total_character' => 6,
    'random_dots' => 50,
    'random_lines' => 25,
    'check_sensitive' => false
);

The captcha code is compared case insensitively by default
If you want case sensitive match, update the option check_sensitive from false to true

Screenshot

carry0987