dapphp / securimage
PHP CAPTCHA 库
Requires
- php: >=5.4
- ext-gd: *
Suggests
- ext-pdo: For database storage support
- ext-pdo_mysql: For MySQL database support
- ext-pdo_sqlite: For SQLite3 database support
README
Securimage - 一个用于创建具有许多选项的 CAPTCHA 图像和音频的 PHP 类。
版本
3.6.8
项目状态
Securimage 已不再维护。寻找替代方案,例如 hCaptcha。
您可以根据许可协议使用、修改和分发代码。
有关项目状态,请参阅 GitHub 上的问题。
下载
代码将在https://github.com/dapphp/securimage上可供查看和下载。
要使用或修改代码,请从 4.0(下一代)分支开始。它具有许多功能和新增功能,因此 3.6 分支应被视为更加过时。
要求
- PHP 5.6 或更高版本
- GD 2.0
- FreeType(必需,用于 TTF 字体)
- PDO(如果使用 Sqlite、MySQL 或 PostgreSQL)
概述
查看示例表单以开始。如果使用数据库存储,则不需要 PHP 会话。
描述
Securimage 是什么?
Securimage 是一个 PHP 类,用于生成和验证 CAPTCHA 图像。
该类使用现有的 PHP 会话或如果没有找到会话则创建自己的会话来存储 CAPTCHA 代码。此外,可以使用数据库而不是会话存储。
类中的变量用于控制图像的样式和显示。该类使用 TTF 字体和效果来增强图像的安全性。
它还创建可听代码,为视障用户播放。
升级通知
3.6.3 和以下版本: Securimage 3.6.4 修复了 example_form.ajax.php 中的 XSS 漏洞。建议升级到最新版本或从您的网站上的 securimage 目录中删除 example_form.ajax.php。
3.6.2 和以上版本
如果您正在升级到 3.6.2 或更高版本 并且 使用数据库存储,则在 3.6.2 中更改了表结构,增加了一个 audio_data 列,用于在数据库中存储音频文件以支持 HTTP 范围请求。删除您的表并让 Securimage 重新创建它们,或者查看 securimage.php 中的 createDatabaseTables() 函数以获取新的结构,根据您使用的数据库后端进行更改。如果使用 SQLite,只需用此版本中的文件覆盖您现有的 securimage.sq3 文件。
如果您不使用数据库表进行存储,请忽略此通知。
版权
脚本版权所有(c)2018 Drew Phillips 保留所有权利。
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
许可证
WavFile.php
The WavFile.php class used in Securimage by Drew Phillips and Paul Voegler
is used under the BSD License. See WavFile.php for details.
Many thanks to Paul Voegler (http://www.voegler.eu/) for contributing to
Securimage.
脚本
Securimage 的 Flash 代码
Flash 代码由 Age Bosma 和 Mario Romero 创建 ([email protected]) 非常感谢他们向项目开放此代码!
HKCaptcha
Securimage 部分代码来自 Han-Kwang Nienhuys 的 PHP 验证码
Han-Kwang Nienhuys' PHP captcha
Copyright June 2007
This copyright message and attribution must be preserved upon
modification. Redistribution under other licenses is expressly allowed.
Other licenses include GPL 2 or higher, BSD, and non-free licenses.
The original, unrestricted version can be obtained from
http://www.lagom.nl/linux/hkcaptcha/
AHGBold.ttf
AHGBold.ttf (AlteHaasGroteskBold.ttf) font was created by Yann Le Coroller
and is distributed as freeware.
Alte Haas Grotesk is a typeface that look like an helvetica printed in an
old Muller-Brockmann Book.
These fonts are freeware and can be distributed as long as they are
together with this text file.
I would appreciate very much to see what you have done with it anyway.
yann le coroller
www.yannlecoroller.com
[email protected]
PopForge Flash 库
securimage_play.swf 的部分使用 PopForge Flash 库播放音频
/**
* Copyright(C) 2007 Andre Michelle and Joa Ebert
*
* PopForge is an ActionScript3 code sandbox developed by Andre Michelle
* and Joa Ebert
* http://sandbox.popforge.de
*
* PopforgeAS3Audio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* PopforgeAS3Audio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
图形
一些图形来自 WorLord 的 Humility 图标包
License: GNU/GPL (http://findicons.com/pack/1723/humility)
http://findicons.com/icon/192558/gnome_volume_control
http://findicons.com/icon/192562/gtk_refresh
背景噪音声音文件来自 SoundJay.com
http://www.soundjay.com/tos.html
All sound effects on this website are created by us and protected under
the copyright laws, international treaty provisions and other applicable
laws. By downloading sounds, music or any material from this site implies
that you have read and accepted these terms and conditions:
Sound Effects
You are allowed to use the sounds free of charge and royalty free in your
projects (such as films, videos, games, presentations, animations, stage
plays, radio plays, audio books, apps) be it for commercial or
non-commercial purposes.
But you are NOT allowed to
- post the sounds (as sound effects or ringtones) on any website for
others to download, copy or use
- use them as a raw material to create sound effects or ringtones that
you will sell, distribute or offer for downloading
- sell, re-sell, license or re-license the sounds (as individual sound
effects or as a sound effects library) to anyone else
- claim the sounds as yours
- link directly to individual sound files
- distribute the sounds in apps or computer programs that are clearly
sound related in nature (such as sound machine, sound effect
generator, ringtone maker, funny sounds app, sound therapy app, etc.)
or in apps or computer programs that use the sounds as the program's
sound resource library for other people's use (such as animation
creator, digital book creator, song maker software, etc.). If you are
developing such computer programs, contact us for licensing options.
If you use the sound effects, please consider giving us a credit and
linking back to us but it's not required.