noalyss  Version-6.7.2
 All Data Structures Namespaces Files Functions Variables Enumerations
securimage_show_example.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_example.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 = 250;
00043 $img->image_height = 80;
00044 $img->perturbation = 0.85;
00045 $img->image_bg_color = new Securimage_Color("#f6f6f6");
00046 $img->multi_text_color = array(new Securimage_Color("#3399ff"),
00047                                new Securimage_Color("#3300cc"),
00048                                new Securimage_Color("#3333cc"),
00049                                new Securimage_Color("#6666ff"),
00050                                new Securimage_Color("#99cccc")
00051                                );
00052 $img->use_multi_text = true;
00053 $img->text_angle_minimum = -5;
00054 $img->text_angle_maximum = 5;
00055 $img->use_transparent_text = true;
00056 $img->text_transparency_percentage = 30; // 100 = completely transparent
00057 $img->num_lines = 7;
00058 $img->line_color = new Securimage_Color("#eaeaea");
00059 $img->image_signature = 'phpcaptcha.org';
00060 $img->signature_color = new Securimage_Color(rand(0, 64), rand(64, 128), rand(128, 255));
00061 $img->use_wordlist = true; 
00062 
00063 $img->show('backgrounds/bg3.jpg'); // alternate use:  $img->show('/path/to/background_image.jpg');
00064 
 All Data Structures Namespaces Files Functions Variables Enumerations