00001 <?php 00002 00003 /** 00004 * Project: Securimage: A PHP class for creating and managing form CAPTCHA images<br /> 00005 * File: securimage_show.php<br /> 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or any later version.<br /><br /> 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details.<br /><br /> 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA<br /><br /> 00020 * 00021 * Any modifications to the library should be indicated clearly in the source code 00022 * to inform users that the changes are not a part of the original software.<br /><br /> 00023 * 00024 * If you found this script useful, please take a quick moment to rate it.<br /> 00025 * http://www.hotscripts.com/rate/49400.html Thanks. 00026 * 00027 * @link http://www.phpcaptcha.org Securimage PHP CAPTCHA 00028 * @link http://www.phpcaptcha.org/latest.zip Download Latest Version 00029 * @link http://www.phpcaptcha.org/Securimage_Docs/ Online Documentation 00030 * @copyright 2009 Drew Phillips 00031 * @author drew010 <drew@drew-phillips.com> 00032 * @version 2.0.1 BETA (December 6th, 2009) 00033 * @package Securimage 00034 * 00035 */ 00036 00037 include 'securimage.php'; 00038 00039 $img = new securimage(); 00040 00041 // Change some settings 00042 00043 $img->image_width = 205; 00044 $img->image_height = 50; 00045 $img->perturbation = 0.35; // 1.0 = high distortion, higher numbers = more distortion 00046 $img->image_bg_color = new Securimage_Color("#000000"); 00047 //$img->text_color = new Securimage_Color("#EAEAEA"); 00048 $img->text_transparency_percentage = 45; // 100 = completely transparent 00049 $img->num_lines = 0; 00050 $img->line_color = new Securimage_Color("#0033ff"); 00051 $img->signature_color = new Securimage_Color(rand(0, 64), rand(64, 128), rand(128, 255)); 00052 $img->image_type = SI_IMAGE_JPEG; 00053 $img->background_directory="./backgrounds"; 00054 $img->bgimg="./backgrounds/bg4.jpg"; 00055 $img->use_multi_text=true; 00056 00057 $img->show(); // alternate use: $img->show('/path/to/background_image.jpg');