Download the PHP package erikwang2013/poster-php without Composer

On this page you can find all versions of the php package erikwang2013/poster-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package poster-php

poster-php

PHP 图片验证码与海报生成工具包 —— 框架无关核心 + Laravel / ThinkPHP / Webman / Hyperf 适配。

架构设计图

功能

验证码(三种方式 + 随机切换)

类型 说明
点击验证 click 用户按顺序点击图片上的目标文字
旋转验证 rotate 用户拖动滑块将图片旋转回正确角度
滑块验证 slider 用户拖动拼图块到缺口位置
随机切换 random 随机选取以上三种验证码之一

海报生成

链式 Builder API,支持 14 种元素:

元素 方法 说明
文字 addText() 自动换行,对齐,多行
图片 addImage() 缩放裁剪,圆角,阴影
头像 addAvatar() 圆形裁剪,边框
二维码 addQrcode() 纯 PHP 生成,中心 Logo,底部文案
形状 addShape() 矩形/圆形/圆角,填充/描边
分割线 addLine() 颜色,宽度
水印 addWatermark() 平铺文字,角度,间距
表格 addTable() 表头,斑马纹,列宽
图表 addChart() 柱状图 / 折线图 / 饼图
日历 addCalendar() 月历,高亮日期,标注
艺术字体 addArtisticText() 描边 / 阴影 / 渐变 / 霓虹
Emoji addEmoji() 彩色 emoji 表情渲染
字体图标 addIcon() FontAwesome 图标渲染
颜文字 addEmoticon() 日式颜文字 / 自定义表情

安装

系统要求:PHP >= 8.0,GD 扩展。

可选扩展:

使用说明

一、验证码

1. 点击验证码 (ClickCaptcha)

用户需要按顺序点击图片上的目标文字(如"树""鸟""花"),验证人类操作。

2. 旋转验证码 (RotateCaptcha)

系统随机旋转图片 30°~330°,用户拖动滑块将图片旋转回正。

3. 滑块验证码 (SliderCaptcha)

系统从背景切出拼图块并偏移,用户拖动拼图到缺口位置。

4. 随机切换 (RandomCaptcha)

系统随机从 click / rotate / slider 中选取一种验证码,增加破解难度。

验证安全特性

特性 说明
一次性 验证成功/超过最大次数后 key 删除
防暴力 默认最多验证 3 次(可配置)
有效期 默认 300 秒(可配置)
随机性 每次生成的背景颜色、噪声、目标位置均随机

二、海报生成

基础用法

文字 addText()

图片 addImage()

头像 addAvatar()

二维码 addQrcode()

形状 addShape()

分割线 addLine()

水印 addWatermark()

表格 addTable()

图表 addChart()

日历 addCalendar()

艺术字体 addArtisticText()

Emoji addEmoji()

系统会自动检测 macOS / Linux / Windows 上的 emoji 字体路径。

字体图标 addIcon()

颜文字 addEmoticon()

三、模板系统

框架集成

Laravel

ThinkPHP

config/web.php:

Webman

config/bootstrap.php:

Hyperf

通过 ConfigProvider 自动注册。

配置

config/poster.php,支持 .env 覆盖(参考 .env.example)。

目录结构

开源不易,欢迎支持

微信 支付宝

License

MIT License — Copyright (c) 2026 erik https://erik.xyz


All versions of poster-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-gd Version *
ext-mbstring Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package erikwang2013/poster-php contains the following files

Loading the files please wait ...