html.php
驗證碼:
驗證碼:
驗證碼:
驗證碼:
驗證碼:
code.php
check_code.php
<?php
session_start();
$action = $_get['act'];
$code = trim($_post['code']);
if($action=='num')
}elseif($action=='char')
}elseif($action=='zh')
}elseif($action=='gg')
}elseif($action=='math')
}else
//處理接收中文字串
function unidecode($str, $charcode) /", toutf8, $str);
return mb_convert_encoding($text, $charcode, 'utf-8');
}function toutf8($ar)
elseif ($val < 0x800) else
}return $c;
}?>
php生成驗證碼
header content type image gif 初始化 border 0 是否要邊框 1要 0不要 how 4 驗證碼位數 w how 15 寬度 h 20 高度 fontsize 5 字型大小 alpha abcdefghijkmnopqrstuvwxyz 驗證碼內容1 字母 numb...
php 生成驗證碼
驗證碼個數 num 4 驗證碼寬度 width 80 驗證碼高度 height 20 驗證碼 注意是字串 code 生成驗證碼 for i 0 i num i 驗證碼儲存到session中 session start session verifycode code 建立影象 image imagec...
php 生成驗證碼
che.php session start im imagecreatetruecolor 100,30 設定顏色 bg imagecolorallocate im,0,0,0 背景色 te imagecolorallocate im,255,255,255 字型顏色 for i 0 i 4 i 輸...