Sam Yong
By: a guest | Jul 14th, 2009 | Syntax:
PHP | Size: 1.49 KB | Hits: 148 | Expires: Never
<?php
// note that $_GET['k'] is a static key that you can enter when getting the image.
// generate the key and store into session
// create a shorter key for display
// disable the client side caching
header('Content-type: image/png');
header('Cache-Control: max-age=0');
// randomize the background image
imagestring($timg1, 5
, 0
, $txtx/2
- $txty/2
, $key, $tc);
// output the captcha image
// free up memory
?>