Captcha / Poster / PHP + Rust

Captcha and postersin one package

Three captcha types and fourteen poster elements, rendered in pure PHP, with one API across six frameworks.

poster-php mascot Posty, the poster project pet

One core for captcha and posters

poster-php puts click, rotate and slider verification and chained poster generation in one package. Images and answers are generated in PHP, with no third-party service.

Fourteen poster elements cover text, images, QR codes, tables, charts and calendars. Switch image drivers between GD and ImageMagick, and store captcha state in File, Session, Redis or PSR-16.

  • Click / rotate / slider
  • 14 poster elements
  • GD / ImageMagick
3Captcha types
14Poster elements
6Framework adapters
poster-php mascot Posty Smile expression

Posty

A mascot made of a poster body with captcha gear: a QR card in the left hand and a slider puzzle in the right.

Rendering and checks, both mine.

From human checks to a full poster

Generate, verify and render in one package.

Three captcha types

Click, rotate and slider interactions, with random switching plus configurable difficulty and tolerance.

Fourteen poster elements

Text, images, QR codes, tables, charts, calendars and more, layered in a chain.

Pure PHP QR codes

A built-in Model 2 encoder supporting versions 1 to 40 and L/M/Q/H error correction.

Template rendering

JSON templates with variable substitution; builders can be exported and imported.

Six framework adapters

Laravel, ThinkPHP, Webman, Hyperf, Yii2 and Yii3 share the same core.

Verification security

One-time checks, brute-force protection, expiry, session rate limits and optional trajectory checks.

Same capability, Rust version

Use the Rust implementation alongside the PHP package.

Rust v2.0.0 Rust 1.85 / crate

poster-rust

Captcha and posters for Rust

Brings three captcha types and fourteen poster elements to Rust, with a pure Rust image stack.

  • Three captcha types
  • 14 poster elements
  • 8 framework integrations
View Rust repository

How the features grew

Every release maps to real commits.

v1.4.3

Driver fixes and i18n sync

Fixed alpha channels in Imagick masks and circular crops, and synced docs across 13 languages.

v1.4.1

Slider jigsaw support

Added the jigsaw shape with random tabs on all four sides, sharing one outline for gap and piece.

v1.4.0

Yii2 and Yii3 adapters

Added adapters for both Yii frameworks, keeping core behavior consistent across six frameworks.

v1.3.1

Native entry and hardening

Landed native.php, a rewritten QR encoder, session rate limits and trajectory checks.

Changelog

Recent releases; full list on GitHub Releases.

Latest v1.4.3 All versions
v1.4.32026-10-05

Fixed Imagick masks and circular crops when the source has no alpha, and synced localized docs.

v1.4.22026-10-05

Fixed ImagickDriver masks and circular crops, creating an alpha channel when needed.

v1.4.12026-10-05

Added jigsaw slider verification; synced config and diagram docs in 13 languages.

v1.4.02026-09-29

Added Yii2 and Yii3 adapters and synced docs in 12 languages.

v1.3.12026-09-29

Added a native PHP entry point, captcha hardening and a rewritten QR encoder.

v1.3.02026-09-25

Unified the multilingual docs entry and completed language links and character fallbacks.

Install and use

Install it, then run a minimal example.

PHP >= 8.0 / GDFull README
Install
composer require erikwang2013/poster-php
Minimal example
$result = captcha_create('click');
$pass = captcha_verify($result['key'], 'click', [[120, 80], [200, 150], [310, 95]]);

$builder = poster_create(750, 1334);
$builder->background('#FFFFFF');
$builder->addText('新品首发', ['x' => 80, 'y' => 120, 'size' => 48, 'color' => '#333333']);
$builder->save('/output/poster.jpg', 90);

Twelve faces of Posty

Hover and the mood changes.

Search this site

Try “upload”, “migration” or “JWT”.