...

View Full Version : Image Validation



hughesmi
11-10-2007, 09:09 PM
Hi all, i am looking for some code to prevent bots and spammers that are taking liberty’s with my simple form mail via my websites. I have Goolged but i am not finding anything.

All help would be great.

Mike

Mwnciau
11-10-2007, 09:18 PM
It's called image CAPTCHA (http://www.google.co.uk/search?client=firefox-a&rls=org.mozilla%3Aen-GB%3Aofficial&channel=s&hl=en&q=php+image+CAPTCHA&meta=&btnG=Google+Search)

hughesmi
11-10-2007, 09:21 PM
Thanks Dude.

Mike

abduraooft
11-11-2007, 12:24 PM
It is better to know about Inaccessibility of CAPTCHA (http://www.w3.org/TR/turingtest/)

cheat
11-17-2007, 05:20 AM
just do something like this use it if you wish to.


<?
session_start();

header("Expires: Sat, 17 Nov 2007 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);

header("Pragma: no-cache");

header("Content-type: image/gif");

$image = imagecreate(85, 15);


$black = imagecolorallocate ($image, 3, 3, 3);
$white = imagecolorallocate ($image, 255, 255, 255);

/*

$rand1 = rand(0, 10);
$rand2 = rand(0, 10);

imageline($image, 0, $rand1, 65, $rand2, $white);

$rand1 = rand(0, 10);
$rand2 = rand(0, 10);

imageline($image, 0, $rand1, 65, $rand2, $white);

*/

$font = "FONT.ttf"; //font


$string1 = rand(0, 9);
$rotate = rand(-0, 0);
$y = rand(15, 15);
ImageTTFText($image, 10, $rotate, 5, $y, $white, $font, $string1);

$string2 = rand(0, 9);
$rotate = rand(-0, 0);
ImageTTFText($image, 10, $rotate, 25, $y, $white, $font, $string2);

$string3 = rand(0, 9);
$rotate = rand(-0, 0);
ImageTTFText($image, 10, $rotate, 45, $y, $white, $font, $string3);

$string4 = rand(0, 9);
$rotate = rand(-0, 0);
ImageTTFText($image, 10, $rotate, 65, $y, $white, $font, $string4);




$string = $string1;
$string .= $string2;
$string .= $string3;
$string .= $string4;

$_SESSION[verify] = md5($string);

imagegif($image);
imagedestroy($image);
?>


Then just create a function for checking the image. simple.

BubikolRamios
12-08-2007, 09:10 PM
I just managed to implement jCaptcha, just to find that it is bunch of code, bunch of dependencys, and doesn't look right. So I made it mayself in couple of lines. Heire is how result looks:

http://imgshuck.com/images/xqsp.jpg

Did find edges on it with some programs, no usable stuff, what do you think is this OK ?

felgall
12-08-2007, 11:56 PM
I just managed to implement jCaptcha, just to find that it is bunch of code, bunch of dependencys, and doesn't look right. So I made it mayself in couple of lines. Heire is how result looks:

http://imgshuck.com/images/xqsp.jpg

Did find edges on it with some programs, no usable stuff, what do you think is this OK ?


There will be a percentage of people who will be unable to see the numbers in that image.

BubikolRamios
12-09-2007, 05:55 AM
I thinked of that, but think this percentage is not significant ?
If not significant I can always tell them to send me email or something.

Anyway I'm quite sure that OCR and stuff (tested it with Abby fine reader and nothing) could not read this, especialy if I rotate each character a bit ?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum