Captcha
<?php function make_seed(){ list($usec , $sec) = explode (' ', microtime()); return (float) $sec + ((float) $usec * 100000); } function randomString($len) { srand(make_seed()); $possible = 'abcdefhijkmnprstuvwxyz23456789'; $str = ''; while(strlen($str)<$len) { $str .= substr($possible,(rand()%(strlen($possible))),1); } return($str); } session_start(); unset($_SESSION['captcha_spam']); $text = randomString(5); $_SESSION['captcha_spam'] = $text; header('Content-type: image/png'); $img = ImageCreateFromPNG('captcha.png'); $color = ImageColorAllocate($img, 0, 0, 0); $ttf = getcwd().'/somefont.tff'; $ttfsize = 20; $angle = rand(0,5); $t_x = rand(5,20); $t_y = 25; imagettftext($img, $ttfsize, $angle, $t_x, $t_y, $color, $ttf, $text); imagepng($img); imagedestroy($img); ?>
Simple captcha image. captcha.png is the backround image for you captcha. "somefont.tff" is a random truetype font for the text in your captcha image.
Anonymous on Sep 25, 2009
jyg4dA <a href="http://veuclukfpkjx.com/">veuclukfpkjx</a>, [url=http://eggcdtblsdft.com/]eggcdtblsdft[/url], [link=http://jkqxfogpmesx.com/]jkqxfogpmesx[/link], http://bwvrilfolpie.com/
Anonymous on Nov 04, 2009
93cu2P <a href="http://dheiulsejglp.com/">dheiulsejglp</a>, [url=http://yxivfxtpqzvb.com/]yxivfxtpqzvb[/url], [link=http://dvrshvhwzvxa.com/]dvrshvhwzvxa[/link], http://ttxohokecmrv.com/
Anonymous on Jan 13, 2010
UnszSu <a href="http://ezzboydvibgs.com/">ezzboydvibgs</a>, [url=http://hjsotnpqjcbi.com/]hjsotnpqjcbi[/url], [link=http://lpcbbnlzdsus.com/]lpcbbnlzdsus[/link], http://btzvsrnasdau.com/
Anonymous on Jan 21, 2010
kWIxpc <a href="http://qizkctkxupbz.com/">qizkctkxupbz</a>, [url=http://gddfszxqnnuv.com/]gddfszxqnnuv[/url], [link=http://unlxhjtzfpah.com/]unlxhjtzfpah[/link], http://saefqpnppayd.com/
Anonymous on Mar 14, 2010
tFZJ2E <a href="http://mwuzwvzgpppw.com/">mwuzwvzgpppw</a>, [url=http://pczjkicyvmxa.com/]pczjkicyvmxa[/url], [link=http://ofzeeemzrezy.com/]ofzeeemzrezy[/link], http://pqwfntqdnlpz.com/