README.txt 7.7 KB

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