PHPackages                             vaibhavpandeyvpz/ank - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. vaibhavpandeyvpz/ank

ActiveLibrary[Image &amp; Media](/categories/media)

vaibhavpandeyvpz/ank
====================

Simple and customizable captcha generation library, runs on PHP &gt;= 8.2.

2.0.0(4mo ago)1521MITPHPPHP ^8.2CI passing

Since Feb 1Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/vaibhavpandeyvpz/ank)[ Packagist](https://packagist.org/packages/vaibhavpandeyvpz/ank)[ Docs](https://github.com/vaibhavpandeyvpz/ank)[ RSS](/packages/vaibhavpandeyvpz-ank/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (4)Used By (1)

Ank
===

[](#ank)

[![Latest Version](https://camo.githubusercontent.com/82af0f9f2dc03ca3bc4d26c0afc34caf1dbed0cfcc9511b8ea7ddf7764ce71c9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7661696268617670616e64657976707a2f616e6b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vaibhavpandeyvpz/ank)[![Downloads](https://camo.githubusercontent.com/2a074ef6c733649800feaf50e07e4a1959fee6184c38f1b0f75d3b5deca65db8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7661696268617670616e64657976707a2f616e6b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vaibhavpandeyvpz/ank)[![PHP Version](https://camo.githubusercontent.com/27303ea6bef5a5ab9b6253c40f40c777587b9148734c3505b88dd7074415df9e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7661696268617670616e64657976707a2f616e6b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vaibhavpandeyvpz/ank)[![License](https://camo.githubusercontent.com/48fbe29c90e35ac930a6eb8320894822ac7984a66f659610118336f5be3c3f8b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7661696268617670616e64657976707a2f616e6b2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/4d558ea4104731aebc1233d680b7aab9aa76c3bec7e003ceb164a5925838c3af/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7661696268617670616e64657976707a2f616e6b2f74657374732e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265)](https://github.com/vaibhavpandeyvpz/ank/actions)

A simple, customizable, and modern CAPTCHA generation library for PHP 8.2+. Generate text-based or mathematics-based CAPTCHAs with full control over appearance, fonts, colors, and distortion.

> **Ank** (`अंक`) means "Number" in Hindi

[![Text CAPTCHA](assets/captcha-anim.gif?raw=true "Text CAPTCHA")](assets/captcha-anim.gif?raw=true) [![Math CAPTCHA](assets/math-captcha-anim.gif?raw=true "Math CAPTCHA")](assets/math-captcha-anim.gif?raw=true)

Features
--------

[](#features)

- 🎨 **Two CAPTCHA Types**: Text-based alphanumeric codes or simple math problems
- 🎭 **Highly Customizable**: Colors, fonts, size, quality, and text distortion
- 🔒 **Secure**: Uses cryptographically secure random number generation
- 🎯 **One-Time Validation**: CAPTCHA answers are automatically removed after validation
- 🖼️ **12 Beautiful Fonts**: Hand-picked Google Fonts included
- 🚀 **Modern PHP**: Built with PHP 8.2+ features (enums, match expressions, strict types)
- 📦 **Zero Dependencies**: Only requires PHP with GD extension
- ✅ **Well Tested**: Comprehensive test suite with high code coverage

Installation
------------

[](#installation)

Install via Composer:

```
composer require vaibhavpandeyvpz/ank
```

Requirements
------------

[](#requirements)

- PHP &gt;= 8.2
- GD extension with FreeType support (for font rendering)

Quick Start
-----------

[](#quick-start)

### Basic Usage

[](#basic-usage)

```
