Changeset 15078 for branches/feature-module-update/html/test/uehara/captcha/ajax_captcha/create_image.php
- Timestamp:
- 2007/07/20 15:58:59 (17 years ago)
- Location:
- branches/feature-module-update
- Files:
-
- 1 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update
-
Property
svn:ignore
set to
.cache
.settings
.projectOptions
-
Property
svn:ignore
set to
-
branches/feature-module-update/html/test/uehara/captcha/ajax_captcha/create_image.php
r12157 r15078 1 1 <?php 2 2 3 // セッションスタート3 // ?祉???激?с?潟?鴻?帥?若?? 4 4 session_start(); 5 5 6 // 画像イメージ生成7 // ランダムな文字列を生成6 // ?糸??ゃ?<?若?悟???? 7 // ???潟????????絖????????? 8 8 $md5_hash = md5(rand(0,999)); 9 // 文字列を5桁にする9 // ??絖?????鐚?罅??????? 10 10 $code = substr($md5_hash, 15, 5); 11 // セッションに生成されたコードを保存11 // ?祉???激?с?潟?????????????潟?若????篆?絖? 12 12 $_SESSION["code"] = $code; 13 13 14 14 $image = ImageCreate(120, 20); 15 15 16 // 色の定義16 // ?蚊???臂 17 17 $white = ImageColorAllocate($image, 255, 255, 255); 18 18 $grey = ImageColorAllocate($image, 204, 204, 204); 19 19 20 // 背景色20 // ????? 21 21 ImageFill($image, 0, 0, $grey); 22 22 23 // 生成したコードを表示23 // ?????????潟?若????茵?ず 24 24 ImageString($image, 5, 30, 3, $code, $white); 25 25 26 // jpag で出力26 // jpag?у?阪?? 27 27 header("Content-Type: image/jpeg"); 28 28 ImageJpeg($image);
Note: See TracChangeset
for help on using the changeset viewer.