noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
securimage_show_example2.php
Go to the documentation of this file.
00001 <?php
00002 
00003 /**
00004  * Project:     Securimage: A PHP class for creating and managing form CAPTCHA images<br />
00005  * File:        securimage_show_example2.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 Drew Phillips <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 $img->image_width = 280;
00043 $img->image_height = 100;
00044 $img->perturbation = 0.9;
00045 $img->code_length = rand(5,6);
00046 $img->image_bg_color = new Securimage_Color("#ffffff");
00047 $img->use_transparent_text = true;
00048 $img->text_transparency_percentage = 75; // 100 = completely transparent
00049 $img->num_lines = 15;
00050 $img->image_signature = '';
00051 $img->text_color = new Securimage_Color("#000000");
00052 $img->line_color = new Securimage_Color("#cccccc");
00053 
00054 $img->show(''); // alternate use:  $img->show('/path/to/background_image.jpg');
00055 
 All Data Structures Namespaces Files Functions Variables Enumerations