Login   Register  
PHP Classes
elePHPant
Icontem

File: sample_img.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of José Manuel Carnero  >  Captchazo  >  sample_img.php  >  Download  
File: sample_img.php
Role: Example script
Content type: text/plain
Description: Use as image
Class: Captchazo
Validate users with image or text based CAPTCHA
Author: By
Last change:
Date: 2012-07-22 16:21
Size: 534 bytes
 

Contents

Class file image Download
<?php session_start(); ?>
<?php 
include('class.captchazo.inc'); ?>
<?php
unset($_SESSION['captchazo']);

$oCaptcha captchazo_sel('texto');

$oCaptcha->sDirectorio false;
$oCaptcha->aCaracteres = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','p','q','r','s','t','u','v','w','x','y','z',1,2,3,4,5,6,7,8,9,0,'!','?','@','#','+','-','*','/','=','$','%','&');
$oCaptcha->iAncho 100;
$oCaptcha->iAlto 50;
$oCaptcha->generar();

$_SESSION['captchazo'] = $oCaptcha->sRespuesta//texto que ha de responder el usuario