文件名称:ASP.NET_2.0_制作彩色验证码教程
文件大小:34KB
文件格式:DOC
更新时间:2014-11-17 11:45:40
彩色验证码
//颜色列表,用于验证码、噪线、噪点 Color[] color ={ Color.Black, Color.Red, Color.Blue, Color.Green, Color.Orange, Color.Brown, Color.DarkBlue }; //字体列表,用于验证码 string[] font ={ "Times New Roman", "MS Mincho", "Book Antiqua", "Gungsuh", "PMingLiU", "Impact" }; //验证码的字符集,去掉了一些容易混淆的字符 char[] character ={ ''2'', ''3'', ''4'', ''5'', ''6'', ''8'', ''9'', ''A'', ''B'', ''C'', ''D'', ''E'', ''F'', ''G'', ''H'', ''J'', ''K'', ''L'', ''M'', ''N'', ''P'', ''R'', ''S'', ''T'', ''W'', ''X'', ''Y'' }; Random rnd = new Random();