PHPackages                             aminarjmand/pure-captcha - 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. aminarjmand/pure-captcha

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

aminarjmand/pure-captcha
========================

A secure, customizable and lightweight PHP CAPTCHA package with multiple difficulty levels

v1.1(4mo ago)012MITPHPPHP &gt;=7.4

Since Feb 16Pushed 4mo agoCompare

[ Source](https://github.com/sibche2013/pure-captcha)[ Packagist](https://packagist.org/packages/aminarjmand/pure-captcha)[ Docs](https://aminarjmand.com)[ RSS](/packages/aminarjmand-pure-captcha/feed)WikiDiscussions main Synced today

READMEChangelog (2)DependenciesVersions (4)Used By (0)

🔒 Pure Captcha
==============

[](#-pure-captcha)

**A secure, customizable and lightweight PHP CAPTCHA package**

**یک پکیج کپچای امن، قابل تنظیم و سبک برای PHP**

[![PHP Version](https://camo.githubusercontent.com/4a5057a857cdb86cf011d334f86b1bbf627728435b1bce61d0859516874ee5f8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344372e342d3838393242462e737667)](https://php.net)[![License: MIT](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](LICENSE)[![Packagist](https://camo.githubusercontent.com/f0729530ded26b20cde978d3247b37480c87a5d21d97a9a0e922ad5d288c480e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616d696e61726a6d616e642f707572652d636170746368612e737667)](https://packagist.org/packages/aminarjmand/pure-captcha)

[English](#english) | [فارسی](#%D9%81%D8%A7%D8%B1%D8%B3%DB%8C)

---

🇬🇧 English
==========

[](#-english)

📖 About
-------

[](#-about)

**Pure Captcha** is a lightweight, dependency-free PHP CAPTCHA package that generates secure CAPTCHA images using only PHP's built-in GD extension. No external services, no JavaScript dependencies, no API keys required.

✨ Features
----------

[](#-features)

- 🎨 **Beautiful UI** — Modern, responsive design with gradient backgrounds and shadow effects
- 🔧 **Fully Customizable** — Configure length, size, fonts, colors, noise, and more
- 🛡️ **5 Difficulty Levels** — From `low` to `nightmare`
- 👻 **Ghost Characters** — Fake background characters to confuse bots
- 🌊 **Wave Distortion** — Sinusoidal warping to defeat OCR
- 🔤 **Multiple Character Sets** — Letters, numbers, special characters, or mixed
- 🌐 **Multi-language** — Built-in support for Persian (fa) and English (en)
- 🔄 **Refresh Button** — AJAX-powered image refresh with spin animation
- 📦 **Zero Dependencies** — Only requires PHP GD extension
- 🎯 **PSR-4 Autoloading** — Composer-ready with proper namespacing
- ⏱️ **Expiry Control** — Auto-expire CAPTCHA codes after configurable time
- 🔑 **Case Sensitivity** — Optional case-sensitive validation

📋 Requirements
--------------

[](#-requirements)

- PHP &gt;= 7.4
- GD Extension (`ext-gd`)
- Session Extension (`ext-session`)

📥 Installation
--------------

[](#-installation)

```
composer require aminarjmand/pure-captcha
```

🚀 Quick Start
-------------

[](#-quick-start)

### Step 1: Create the image endpoint

[](#step-1-create-the-image-endpoint)

Create a file called `captcha_image.php`:

```

    My Form

        Submit

```

### Step 3: Validate the CAPTCHA

[](#step-3-validate-the-captcha)

Create `submit.php`:

```
