2017 © Pedro Peláez
 

library ank

Simple and customizable captcha generation library, runs on PHP >= 5.3.

image

vaibhavpandeyvpz/ank

Simple and customizable captcha generation library, runs on PHP >= 5.3.

  • Thursday, February 2, 2017
  • by vaibhavpandeyvpz
  • Repository
  • 1 Watchers
  • 1 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

vaibhavpandeyvpz/ank

Simple and customizable captcha generation library, runs on PHP >= 5.3., (*1)

Ank: अंक (Number), (*2)

Build status ![Code Coverage][code-coverage-image] ![Latest Version][latest-version-image] ![Downloads][downloads-image] ![PHP Version][php-version-image] ![License][license-image], (*3)

SensioLabsInsight, (*4)

Captcha Mathematics Captcha, (*5)

Install

composer require vaibhavpandeyvpz/ank

Usage

<?php

/**
 * @desc Create an instance of desired captcha generator. Ank\CaptchaGenerator will generate a random captcha code
 *      while Ank\MathCaptchaGenerator will generate basic mathematics calculations for user to solve.
 */
$captcha = new Ank\CaptchaGenerator();
// or
$captcha = new Ank\MathCaptchaGenerator();

// Generate a captcha image and output the image to user-agent
header('Content-Type: image/png');
echo $captcha->getCaptcha();

// To verify user input at a later time
if ($captcha->isValid($_POST['captcha'])) {
    // ... captcha is valid
}

/*
 * @desc You can also customize look and feel of your image, change font, background or text color and lot more.
 */
$image = $captcha->getCaptcha()
    ->setBackgroundColor('#000')
    ->setForegroundColor('#efefef')
    ->setFont(Ank\CaptchaImage::FONT_ACME)
    ->setSize(256, 96)
    ->setQuality(100);

echo $image;

License

See LICENSE.md file. Fonts hand-picked from Google Fonts., (*6)

The Versions

02/02 2017

dev-master

9999999-dev http://vaibhavpandeyvpz.github.io/ank

Simple and customizable captcha generation library, runs on PHP >= 5.3.

  Sources   Download

MIT

The Requires

  • php ^5.3 || ^7.0

 

The Development Requires

generator captcha image random mathematics ank

02/02 2017

1.0.1

1.0.1.0 http://vaibhavpandeyvpz.github.io/ank

Simple and customizable captcha generation library, runs on PHP >= 5.3.

  Sources   Download

MIT

The Requires

  • php ^5.3 || ^7.0

 

The Development Requires

generator captcha image random mathematics ank

01/02 2017

1.0

1.0.0.0 http://vaibhavpandeyvpz.github.io/ank

Simple and customizable captcha generation library, runs on PHP >= 5.3.

  Sources   Download

MIT

The Requires

  • php ^5.3 || ^7.0

 

The Development Requires

generator captcha image random mathematics ank