Gentics Portal.Node PHP API
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
All
Classes
Namespaces
Functions
Variables
Pages
common
modules
fg
assets
elements
captcha
securimage
examples
securimage_show_example2.php
1
<?php
2
3
/**
4
* Project: Securimage: A PHP class for creating and managing form CAPTCHA images<br />
5
* File: securimage_show_example2.php<br />
6
*
7
* Copyright (c) 2012, Drew Phillips
8
* All rights reserved.
9
*
10
* Redistribution and use in source and binary forms, with or without modification,
11
* are permitted provided that the following conditions are met:
12
*
13
* - Redistributions of source code must retain the above copyright notice,
14
* this list of conditions and the following disclaimer.
15
* - Redistributions in binary form must reproduce the above copyright notice,
16
* this list of conditions and the following disclaimer in the documentation
17
* and/or other materials provided with the distribution.
18
*
19
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
* POSSIBILITY OF SUCH DAMAGE.
30
*
31
* Any modifications to the library should be indicated clearly in the source code
32
* to inform users that the changes are not a part of the original software.<br /><br />
33
*
34
* If you found this script useful, please take a quick moment to rate it.<br />
35
* http://www.hotscripts.com/rate/49400.html Thanks.
36
*
37
* @link http://www.phpcaptcha.org Securimage PHP CAPTCHA
38
* @link http://www.phpcaptcha.org/latest.zip Download Latest Version
39
* @link http://www.phpcaptcha.org/Securimage_Docs/ Online Documentation
40
* @copyright 2012 Drew Phillips
41
* @author Drew Phillips <drew@drew-phillips.com>
42
* @version 3.2RC2 (April 2012)
43
* @package Securimage
44
*
45
*/
46
47
require_once
'../securimage.php'
;
48
49
$img =
new
Securimage
();
50
51
//Change some settings
52
$img->image_width = 280;
53
$img->image_height = 100;
54
$img->perturbation = 0.9;
// high level of distortion
55
$img->code_length = rand(5,6);
// random code length
56
$img->image_bg_color =
new
Securimage_Color
(
"#ffffff"
);
57
$img->num_lines = 12;
58
$img->noise_level = 5;
59
$img->text_color =
new
Securimage_Color
(
"#000000"
);
60
$img->noise_color = $img->text_color;
61
$img->line_color =
new
Securimage_Color
(
"#cccccc"
);
62
63
$img->show();
Generated on Thu Feb 6 2014 15:47:54 for Gentics Portal.Node PHP API by
1.8.1.2