|
|
 |
 |
 |
|
|
| Author Details |
Code Information |
|
|
|
Language
|
PHP (Hypertext Preprocessor)
|
|
Expires
|
Never
|
|
Length
|
1,769 Characters (69 Lines)
|
|
Password
|
no password
|
|
|
<!----- FORM PAGE -------> <?php if(isset($_POST['captcha'])) { $captcha_string = $_SESSION['captcha']; $user_input = md5($_POST['captcha']); if($user_input === $captcha_string) { } else { } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html;
charset=utf-8" /> <title>Captcha</title> <style type="text/css"> <!-- img { border: 1px solid #000; vertical-align: top; } #captcha { height: 18px; width: 48px; border: 1px solid #000; padding: 6px; text-align: center; font-weight: bold; text-transform: uppercase; font-size: 13px; } --> </style> </head> <body> <form action="<?php echo
$_SERVER['PHP_SELF']; ?>" method="post"> <img src="image.php"
alt="Error" /> <input type="text"
name="captcha" id="captcha" maxlength="5"
/> <input type="submit"
value="Submit" name="submit" /> </form> </body> </html> <!------- CAPTCHA IMAGE -------> <?php header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header('Content-type: image/png'); $random_string = mt_rand(10000,
99999); $_SESSION['captcha'] = md5($random_string); $image = imagecreate(60, 30); $image_background = imagecolorallocate($image, 255, 255, 255); $image_text = imagecolorallocate($image, 0, 0, 0); imagestring($image, 5, 8,
7, $random_string, $image_text); imagepng($image); imagedestroy($image); |
|
| Please login to post comments. |
|
|
|
|
| |
 |
 |
| |
Latest News About Coder Profile
|
Coder Profile Poll
Which sounds better on your coder profiles, and makes more sense to you (think twitter, facebook, etc)? Followers / Following Fans / Following Fans / Fan Of
please login to cast your vote and see the results of this poll
|
Latest Coder Profile Changes
Coder Profile was last updated
3.49 Years Ago
|
|
|
| |
|
|
|
|