Skip to content

nayzawoo/mmrcaptcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Myanmar Math CAPTCHA

Build Status

PHP Math CAPTCHA with Myanmar Font

Example Example Example Example Example Example Example Example

Requirements

  • PHP >= 5.4
  • GD Library (>=2.0) [or] Imagick PHP extension (>=6.5.7)

Installation

composer require nayzawoo/mmrcaptcha

Usage

Create Captcha Image

<?php

require 'vendor/autoload.php';

use MyanmarCaptcha\Captcha;
use MyanmarCaptcha\CaptchaString;

$captcha = new Captcha(new CaptchaString);
$captcha = $captcha
    ->width(180)
    ->height(50)
    ->fontSize(40)
    ->fontPath(__DIR__.'/src/assets/mon3.ttf')
    ->textColor("#000000")
    ->backgroundColor("#FFFFFF")
    ->backgroundImage("./src/assets/bg1.png")
    ->horizontalLines(5)
    ->disableDistortion()
    ->dots(2000)
    ->verticalLines(20)
    ->invert()
    ->build();

$imageQuality = 100;
echo $captcha->response('jpg', $imageQuality);

License

This library is released under the MIT License. See License file for more details.

About

Myanmar Simple Math CAPTCHA

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages