在Z-BLOG可用的新版ASP的GIF验证码[V70404](3)
If vDX = 0 Then
vAngle = Sgn(vDY) * 3.14/2
Else
vAngle = Atn(vDY / vDX)
End If
If Sin(vAngle) = 0 Then
vLength = vDX
Else
vLength = vDY / Sin(vAngle)
End If
vAngle = vAngle + (Rnd - 0.5) * 2 * Angle * 3.14 * 2 / 100
vDX = Int(Cos(vAngle) * vLength)
vDY = Int(Sin(vAngle) * vLength)
If Abs(vDX) > Abs(vDY) Then vDeltaT = Abs(vDX) Else vDeltaT = Abs(vDY)
For j = 1 To vDeltaT
SetDot Margin(0) + vStartX + j * vDX / vDeltaT, Margin(2) + vStartY + j * vDY / vDeltaT
Next
vStartX = vStartX + vDX
vStartY = vStartY + vDY
End If
Next
End Sub
Public Sub Output()
Response.Expires = -9999
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-ctrol", "no-cache"
Response.ContentType = "image/gif"
Response.BinaryWrite ChrB(Asc("G")) & ChrB(Asc("I")) & ChrB(Asc("F"))
Response.BinaryWrite ChrB(Asc("8")) & ChrB(Asc("9")) & ChrB(Asc("a"))
Response.BinaryWrite ChrB(Width Mod 256) & ChrB((Width \ 256) Mod 256)
Response.BinaryWrite ChrB(Height Mod 256) & ChrB((Height \ 256) Mod 256)
Response.BinaryWrite ChrB(128) & ChrB(0) & ChrB(0)
Response.BinaryWrite ChrB(250) & ChrB(250) & ChrB(250)
Response.BinaryWrite ChrB(0) & ChrB(0) & ChrB(0)
Response.BinaryWrite ChrB(Asc(","))
Response.BinaryWrite ChrB(0) & ChrB(0) & ChrB(0) & ChrB(0)
Response.BinaryWrite ChrB(Width Mod 256) & ChrB((Width \ 256) Mod 256)
Response.BinaryWrite ChrB(Height Mod 256) & ChrB((Height \ 256) Mod 256)
Response.BinaryWrite ChrB(0) & ChrB(7) & ChrB(255)
Dim x, y, i : i = 0
For y = 0 To Height - 1
内容版权声明:除非注明,否则皆为本站原创文章。