无标题文档

<% Function gen_key(digits) dim char_array(10) char_array(0) = "0" char_array(1) = "1" char_array(2) = "2" char_array(3) = "3" char_array(4) = "4" char_array(5) = "5" char_array(6) = "6" char_array(7) = "7" char_array(8) = "8" char_array(9) = "9" randomize do while len(output) < digits '字符串长于规定值则跳出循环 num = char_array(Int((9 - 0 + 1) * Rnd + 0)) output = output + num loop gen_key = output End Function NewString="的一是在不了有和人这中大为上个国我以要他时来用们生到作地于出就分对成会可主发年动同工也能下过子说产种面而方后多定行学法所民得经十三之进着等部度家电力里如水化高自二理起小物现实加量都两体制机当使点从业本去把性好应开它合还因由其些然前外天政四日那社义事平形相全表间样与关各重新线内数正心反你明看原又么利比或但质气第向道命此变条只没结解问意建月公无系军很情者最立代想已通并提直题党程展五果料象员革位入常文总次品式活设及管特件长求老头基资边流路级少图山统接知较将组见计别她手角期根论运农指几九区强放决西被干做必战先回则任取据处队南给色光门即保治北造百规热领七海口东导器压志世金增争济阶油思术极交受联什认六共权收证改清己美再采转更单风切打白教速花带安场身车例真务具万每目至达走积示议声报斗完类八离华名确才科张信马节话米整空元况今集温传土许步群广石记需段研界拉林律叫且究观越织装影算低持音众书布复容儿须际商非验连断深难近矿千周委素技备半办青省列习响约支般史感劳便团往酸历市克何除消构府称太准精值号率族维划选标写存候毛亲快效斯院查江型眼王按格养易置派层片始却专状育厂京识适属圆包火住调满县局照参红细引听该铁价严" Randomize timer zNum = cint(9*Rnd) CnText="" for i=1 to 4 CnText=CnText&Mid(newString,Int(Rnd()*498)+1,1) next tu= gen_key(1)&".gif" tmStart = timer() Dim Jpeg,Path Set Jpeg = Server.CreateObject("Persits.Jpeg") Path = Server.MapPath("GetCode/"&tu&"") Jpeg.Open Path' 添加文字水印 if gen_key(1)="1" then Jpeg.Canvas.Font.Color = &HFF0000 '颜色 Jpeg.Canvas.Font.ShadowColor = &HFF0000 elseif gen_key(1)="2" then Jpeg.Canvas.Font.Color = &Hffffff Jpeg.Canvas.Font.ShadowColor = &Hffffff elseif gen_key(1)="3" then Jpeg.Canvas.Font.Color = &HFF7800 Jpeg.Canvas.Font.ShadowColor = &HFF7800 elseif gen_key(1)="4" then Jpeg.Canvas.Font.Color = &H7B3A00 Jpeg.Canvas.Font.ShadowColor = &H7B3A00 elseif gen_key(1)="5" then Jpeg.Canvas.Font.Color = &HF000FF Jpeg.Canvas.Font.ShadowColor = &HF000FF elseif gen_key(1)="6" then Jpeg.Canvas.Font.Color = &H8498FF Jpeg.Canvas.Font.ShadowColor = &H8498FF elseif gen_key(1)="7" then Jpeg.Canvas.Font.Color = &H00FFF6 Jpeg.Canvas.Font.ShadowColor = &H00FFF6 elseif gen_key(1)="8" then Jpeg.Canvas.Font.Color = &H24FF00 Jpeg.Canvas.Font.ShadowColor = &H24FF00 elseif gen_key(1)="9" then Jpeg.Canvas.Font.Color = &H873238 Jpeg.Canvas.Font.ShadowColor = &H873238 else Jpeg.Canvas.Font.Color = &H348382 Jpeg.Canvas.Font.ShadowColor = &H348382 end if Jpeg.Canvas.Font.Size =40 Jpeg.Canvas.Font.Family = "Arial Black" '字体 Jpeg.Canvas.Font.Bold = false '是否加粗 Jpeg.Canvas.Font.ShadowYOffset = 1 Jpeg.Canvas.Font.ShadowXOffset = 1 Jpeg.Canvas.Print 10, 10, CnText '打印坐标x,打印坐标y,需要打印的字符 '图片片框处理 Jpeg.Canvas.Pen.Color = &H000000 '颜色 Jpeg.Canvas.Pen.Width = 1 '画笔宽度 Jpeg.Canvas.Brush.Solid = False '是否加粗处理 Jpeg.Canvas.Bar 2, 2, Jpeg.Width, Jpeg.Height '起始X坐标 起始Y坐标 输入长度 输入高度 Jpeg.Save Server.MapPath("images/websen.jpg") Set Jpeg = Nothing Session("Foosuns") =lcase(CnText) '记录入Session response.Write "" %>