This page has been spamed. I need to add an Image verification form to this. any ideas of how I would do this.
http://kidneysocal.org/brochure.html
http://kidneysocal.org/brochure.html
This page has been spamed. I need to add an Image verification form to this. any ideas of how I would do this.
http://kidneysocal.org/brochure.html
How many Spam messages have you got???
ummm, wow.. a lot, proably arround 200 in the last week...
thanks guys
<?php
$width = 80;
$height = 40;
$image = ImageCreate($width,$height);
$color = ImageColorAllocate($image,41,41,41);
srand((double)microtime()*1000000);
$string = md5(rand(0,9999));
$string = substr($string,17,5);
$bg = imagecreatefrompng("./images/verificationimgbg.png");
imagesettile($image, $bg);
ImageFilledRectangle($image,0,0,$width, $height,IMG_COLOR_TILED);
$textcolor = ImageColorAllocate($image,153,153,153);
$xposition = rand(1,32);
$yposition = rand(1,19);
if(!$string) {
die("String contained no value.");
}
ImageString($image, 8, $xposition, $yposition, $string, $textcolor);
session_start();
$_SESSION['imageVeriChars'] = md5($string);
if(!$_SESSION['imageVeriChars']) {
die("Session not set.");
}
// send the image
header("content-type: image/png");
ImagePNG($image);
ImageDestroy($image);
?>