remove own static stuff. use what's in place
[matches/MCTX3420.git] / testing / MCTXWeb / public_html / users / models / captcha.php
1 <?php\r
2 /*\r
3 UserCake Version: 2.0.2\r
4 http://usercake.com\r
5 */\r
6 session_start();\r
7 $md5_hash = md5(rand(0,99999)); \r
8 $security_code = substr($md5_hash, 25, 5); \r
9 $enc = md5($security_code);\r
10 $_SESSION['captcha'] = $enc;\r
11 \r
12 $width = 150;\r
13 $height = 30; \r
14 \r
15 $image = ImageCreate($width, $height);  \r
16 $white = ImageColorAllocate($image, 255, 255, 255);\r
17 $black = ImageColorAllocate($image, 0, 0, 0);\r
18 $grey = ImageColorAllocate($image, 200, 200, 200);\r
19 \r
20 ImageFill($image, 0, 0, $white); \r
21 ImageString($image, 10, 5, 0, $security_code, $black); \r
22 \r
23 header("Content-Type: image/png"); \r
24 ImagePng($image);\r
25 ImageDestroy($image);\r
26 \r
27 ?>\r

UCC git Repository :: git.ucc.asn.au