PHP code example of nayzawoo / mmrcaptcha
1. Go to this page and download the library: Download nayzawoo/mmrcaptcha library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nayzawoo / mmrcaptcha example snippets
yanmarCaptcha\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);