<% Response.Expires = 0 Dim passText passText = getRandomChars(6) Session("AUTH") = passText Set Jpeg = Server.CreateObject("Persits.Jpeg") Jpeg.New 100, 50, &HFFFFFF Jpeg.Canvas.Font.Color = &HFF0000 Jpeg.Canvas.Font.Family = "Courier New" Jpeg.Canvas.Pen.Color = &H000000 Jpeg.Canvas.Pen.Width = 1 Jpeg.Canvas.Brush.Solid = False Jpeg.Canvas.PrintText 15, 15, passText Jpeg.Canvas.DrawBar 1, 1, 100, 50 Jpeg.SendBinary Jpeg.Close Function getRandomChars(ByVal iNoChars) Dim sChars, strStr Dim i Randomize(Timer()) sChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" sChars = sChars & "123456789" For i = 1 to iNoChars strStr = strStr & Mid(sChars, Rnd * Len(sChars) + 1, 1) Next getRandomChars = strStr End Function %>