PHP Math CAPTCHA with Myanmar Font
- PHP >= 5.4
- GD Library (>=2.0) [or] Imagick PHP extension (>=6.5.7)
composer require nayzawoo/mmrcaptcha
<?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);
This library is released under the MIT License. See License file for more details.