source: branches/feature-module-update/html/test/uehara/captcha/ajax_captcha/create_image.php @ 15078

Revision 15078, 712 bytes checked in by nanasess, 17 years ago (diff)

r15064 から svn cp
とりあえず暫定コミット.

  • UTF-8 に変更
  • slib.php, glib.php のクラス化
  • LC_Page の抽象化(一部)
Line 
1<?php
2
3// ?祉???激?с?潟?鴻?帥?若??
4session_start();
5
6// ?糸??ゃ?<?若?悟????
7// ???潟????????絖?????????
8$md5_hash = md5(rand(0,999));
9// ??絖?????鐚?罅???????
10$code = substr($md5_hash, 15, 5);
11// ?祉???激?с?潟?????????????潟?若????篆?絖?
12$_SESSION["code"] = $code;
13
14$image = ImageCreate(120, 20); 
15
16// ?蚊???臂
17$white = ImageColorAllocate($image, 255, 255, 255);
18$grey = ImageColorAllocate($image, 204, 204, 204);
19
20// ?????
21ImageFill($image, 0, 0, $grey);
22
23// ?????????潟?若????茵?ず
24ImageString($image, 5, 30, 3, $code, $white);
25
26// jpag?у?阪??
27header("Content-Type: image/jpeg");
28ImageJpeg($image);
29ImageDestroy($image);
30
31exit;
32?>
Note: See TracBrowser for help on using the repository browser.