<% 'Specify your captcha length here, this is the only configuration requirement captchaLength = 5 Function captcha(captchaLength) if captchaLength > 15 then captchaLength = 15 HighestValue = left(100000000000000,captchaLength) lowestValue = left(999999999999999,captchaLength) Randomize intHighestNumber = Int((HighestValue - LowestValue + 1) * Rnd) + LowestValue session("captcha") = Int(intHighestNumber) x = 1 response.write vbcrlf & "" & vbcrlf & vbtab & "" & vbcrlf while x <= captchaLength response.write vbtab & vbtab & "" & vbcrlf x = x + 1 wend response.write vbtab & "" & vbcrlf & "
" & vbcrlf End Function %> <% if request("action") = "captcha" then if cstr(request("captcha")) = cstr(session("captcha")) then response.Redirect("contact.asp") else %> <% end if end if %>
Email:*
Company:
Title:
FirstName:
LastName:
Phone:
Fax:
Address:
City:
State:
Postal Code:
Comments:
<%captcha(captchaLength)%>