PHP Classes
elePHPant
Icontem

File: captcha_image.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Muharrem ERIN  >  KG CAPTCHA Class  >  captcha_image.php  >  Download  
File: captcha_image.php
Role: Example script
Content type: text/plain
Description: create image file
Class: KG CAPTCHA Class
Generate images for CAPTCHA validation
Author: By
Last change:
Date: 7 years ago
Size: 666 bytes
 

Contents

Class file image Download
<?PHP
session_start
();

require_once(
'kgCaptcha.class.php');

$kgCaptcha =& new kgCaptcha();

$images = array('bg_1.png', 'bg_2.png'); // jpg, gif, png
$fonts = array('oklahoma.ttf', 'Army.ttf'); // ttf fonts
$fontsizes = array(13, 14, 15);
$colors = array('128,23,23', '128,23,22', '33,67,87', '67,70,83', '31,56,163', '48,109,22', '165,42,166', '18,95,98', '213,99,8'); // RGB colors

$kgCaptcha -> captcha_set($images, 5, $colors, $fonts, $fontsizes, 220, 30, 45);
/*
captcha_set function arguments
1 - background images
2 - rasgele charachter lengh
3 - font colors
4 - fonts
5 - font sizes
6 - width
7 - height
8 - charachters space
*/
?>