[12617] | 1 | NAME: |
---|
| 2 | |
---|
| 3 | Securimage - A PHP class for creating captcha images and audio with many options. |
---|
| 4 | |
---|
[26554] | 5 | VERSION: 3.5.1 |
---|
[12617] | 6 | |
---|
| 7 | AUTHOR: |
---|
| 8 | |
---|
| 9 | Drew Phillips <drew@drew-phillips.com> |
---|
| 10 | |
---|
| 11 | DOWNLOAD: |
---|
| 12 | |
---|
| 13 | The latest version can always be |
---|
| 14 | found at http://www.phpcaptcha.org |
---|
| 15 | |
---|
| 16 | DOCUMENTATION: |
---|
| 17 | |
---|
| 18 | Online documentation of the class, methods, and variables can |
---|
| 19 | be found at http://www.phpcaptcha.org/Securimage_Docs/ |
---|
| 20 | |
---|
| 21 | REQUIREMENTS: |
---|
| 22 | PHP 5.2 or greater |
---|
| 23 | GD 2.0 |
---|
| 24 | FreeType (Required, for TTF fonts) |
---|
[26554] | 25 | PDO (if using Sqlite, MySQL, or PostgreSQL) |
---|
[12617] | 26 | |
---|
| 27 | SYNOPSIS: |
---|
| 28 | |
---|
| 29 | require_once 'securimage.php'; |
---|
| 30 | |
---|
| 31 | $image = new Securimage(); |
---|
| 32 | |
---|
| 33 | $image->show(); |
---|
| 34 | |
---|
| 35 | // Code Validation |
---|
| 36 | |
---|
| 37 | $image = new Securimage(); |
---|
| 38 | if ($image->check($_POST['code']) == true) { |
---|
| 39 | echo "Correct!"; |
---|
| 40 | } else { |
---|
| 41 | echo "Sorry, wrong code."; |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | DESCRIPTION: |
---|
| 45 | |
---|
| 46 | What is Securimage? |
---|
| 47 | |
---|
| 48 | Securimage is a PHP class that is used to generate and validate CAPTCHA images. |
---|
| 49 | The classes uses an existing PHP session or creates its own if none is found to store the |
---|
| 50 | CAPTCHA code. Variables within the class are used to control the style and display of the image. |
---|
| 51 | The class supports TTF fonts and effects for strengthening the security of the image. |
---|
| 52 | An audible code can also be streamed to the browser for visually impared users. |
---|
| 53 | |
---|
| 54 | |
---|
| 55 | COPYRIGHT: |
---|
[26554] | 56 | Copyright (c) 2013 Drew Phillips |
---|
[12617] | 57 | All rights reserved. |
---|
| 58 | |
---|
| 59 | Redistribution and use in source and binary forms, with or without modification, |
---|
| 60 | are permitted provided that the following conditions are met: |
---|
| 61 | |
---|
| 62 | - Redistributions of source code must retain the above copyright notice, |
---|
| 63 | this list of conditions and the following disclaimer. |
---|
| 64 | - Redistributions in binary form must reproduce the above copyright notice, |
---|
| 65 | this list of conditions and the following disclaimer in the documentation |
---|
| 66 | and/or other materials provided with the distribution. |
---|
| 67 | |
---|
| 68 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
---|
| 69 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
| 70 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
| 71 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
---|
| 72 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
---|
| 73 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
---|
| 74 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
---|
| 75 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
---|
| 76 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
---|
| 77 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
---|
| 78 | POSSIBILITY OF SUCH DAMAGE. |
---|
| 79 | |
---|
| 80 | ----------------------------------------------------------------------------- |
---|
[26554] | 81 | The WavFile.php class used in Securimage by Drew Phillips and Paul Voegler is |
---|
| 82 | used under the BSD License. See WavFile.php for details. |
---|
| 83 | Many thanks to Paul Voegler (http://www.voegler.eu/) for contributing to |
---|
| 84 | Securimage. |
---|
| 85 | |
---|
| 86 | ----------------------------------------------------------------------------- |
---|
| 87 | Flash code created for Securimage by Age Bosma & Mario Romero (animario@hotmail.com) |
---|
[12617] | 88 | Many thanks for releasing this to the project! |
---|
| 89 | |
---|
| 90 | ------------------------------------------------------------------------------ |
---|
| 91 | Portions of Securimage contain code from Han-Kwang Nienhuys' PHP captcha |
---|
| 92 | |
---|
| 93 | Han-Kwang Nienhuys' PHP captcha |
---|
| 94 | Copyright June 2007 |
---|
| 95 | |
---|
| 96 | This copyright message and attribution must be preserved upon |
---|
| 97 | modification. Redistribution under other licenses is expressly allowed. |
---|
| 98 | Other licenses include GPL 2 or higher, BSD, and non-free licenses. |
---|
| 99 | The original, unrestricted version can be obtained from |
---|
| 100 | http://www.lagom.nl/linux/hkcaptcha/ |
---|
| 101 | |
---|
| 102 | ------------------------------------------------------------------------------- |
---|
| 103 | AHGBold.ttf (AlteHaasGroteskBold.ttf) font was created by Yann Le Coroller and is distributed as freeware |
---|
| 104 | |
---|
| 105 | Alte Haas Grotesk is a typeface that look like an helvetica printed in an old Muller-Brockmann Book. |
---|
| 106 | |
---|
| 107 | These fonts are freeware and can be distributed as long as they are |
---|
| 108 | together with this text file. |
---|
| 109 | |
---|
| 110 | I would appreciate very much to see what you have done with it anyway. |
---|
| 111 | |
---|
| 112 | yann le coroller |
---|
| 113 | www.yannlecoroller.com |
---|
| 114 | yann@lecoroller.com |
---|
| 115 | |
---|
[26554] | 116 | ------------------------------------------------------------------------------- |
---|
| 117 | Portions of securimage_play.swf use the PopForge flash library for playing audio |
---|
| 118 | |
---|
| 119 | /** |
---|
| 120 | * Copyright(C) 2007 Andre Michelle and Joa Ebert |
---|
| 121 | * |
---|
| 122 | * PopForge is an ActionScript3 code sandbox developed by Andre Michelle and Joa Ebert |
---|
| 123 | * http://sandbox.popforge.de |
---|
| 124 | * |
---|
| 125 | * PopforgeAS3Audio is free software; you can redistribute it and/or modify |
---|
| 126 | * it under the terms of the GNU General Public License as published by |
---|
| 127 | * the Free Software Foundation; either version 3 of the License, or |
---|
| 128 | * (at your option) any later version. |
---|
| 129 | * |
---|
| 130 | * PopforgeAS3Audio is distributed in the hope that it will be useful, |
---|
| 131 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 132 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 133 | * GNU General Public License for more details. |
---|
| 134 | * |
---|
| 135 | * You should have received a copy of the GNU General Public License |
---|
| 136 | * along with this program. If not, see <http://www.gnu.org/licenses/> |
---|
| 137 | */ |
---|
| 138 | |
---|
| 139 | ------------------------------------------------------------------------------- |
---|
| 140 | Some graphics used are from the Humility Icon Pack by WorLord |
---|
| 141 | |
---|
| 142 | License: GNU/GPL (http://findicons.com/pack/1723/humility) |
---|
| 143 | http://findicons.com/icon/192558/gnome_volume_control |
---|
| 144 | http://findicons.com/icon/192562/gtk_refresh |
---|
| 145 | |
---|
| 146 | ------------------------------------------------------------------------------- |
---|
| 147 | Background noise sound files are from SoundJay.com |
---|
| 148 | http://www.soundjay.com/tos.html |
---|
| 149 | |
---|
| 150 | All sound effects on this website are created by us and protected under |
---|
| 151 | the copyright laws, international treaty provisions and other applicable |
---|
| 152 | laws. By downloading sounds, music or any material from this site implies |
---|
| 153 | that you have read and accepted these terms and conditions: |
---|
| 154 | |
---|
| 155 | Sound Effects |
---|
| 156 | You are allowed to use the sounds free of charge and royalty free in your |
---|
| 157 | projects (such as films, videos, games, presentations, animations, stage |
---|
| 158 | plays, radio plays, audio books, apps) be it for commercial or |
---|
| 159 | non-commercial purposes. |
---|
| 160 | |
---|
| 161 | But you are NOT allowed to |
---|
| 162 | - post the sounds (as sound effects or ringtones) on any website for |
---|
| 163 | others to download, copy or use |
---|
| 164 | - use them as a raw material to create sound effects or ringtones that |
---|
| 165 | you will sell, distribute or offer for downloading |
---|
| 166 | - sell, re-sell, license or re-license the sounds (as individual sound |
---|
| 167 | effects or as a sound effects library) to anyone else |
---|
| 168 | - claim the sounds as yours |
---|
| 169 | - link directly to individual sound files |
---|
| 170 | - distribute the sounds in apps or computer programs that are clearly |
---|
| 171 | sound related in nature (such as sound machine, sound effect |
---|
| 172 | generator, ringtone maker, funny sounds app, sound therapy app, etc.) |
---|
| 173 | or in apps or computer programs that use the sounds as the program's |
---|
| 174 | sound resource library for other people's use (such as animation |
---|
| 175 | creator, digital book creator, song maker software, etc.). If you are |
---|
| 176 | developing such computer programs, contact us for licensing options. |
---|
| 177 | |
---|
| 178 | If you use the sound effects, please consider giving us a credit and |
---|
| 179 | linking back to us but it's not required. |
---|
| 180 | |
---|
| 181 | |
---|