Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

FedericoBiccheddu/ascii-captcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ascii-captcha

A very original ASCII Captcha.

Build Status Scrutinizer Code Quality

Usage

/* Create an instance of the alphabet to use. */
$alphabet = new FedericoBiccheddu\AsciiCaptcha\Alphabet\DefaultAlphabet;

/* Init the main Captcha class */
$captcha = new FedericoBiccheddu\AsciiCaptcha\Captcha($alphabet);

/* Generate a random string */
$captcha->generateString();

/*
 * Display your ASCII generated code.
 * By default, toHtml() use self-close break. You can
 * set the first parameter "false" to use <br>
 */
echo $captcha->toHtml();

Example result for string "06YF2":

   *****     *******   **    **  ********   *******  
  **   **   **     **   **  **   **        **     ** 
 **   ****  **           ****    **               ** 
 ** *** **  ********      **     ******     *******  
 ****   **  **     **     **     **        **        
  **   **   **     **     **     **        **        
   *****     *******      **     **        ********* 

Releases

No releases published

Packages

No packages published

Languages