Preventing automated form submissions

Hi,

I know this is gonna sound cheeky and lazy but... Before I go off and code this myself I was wondering if anyone had any classic ASP code for generating an anti-robot image for forms that they might be willing to share?

Preferably something that makes use of componets provided by jodohost.

Come to think of it, does jodohost provide a dedicated component for this?


Thanks,
Andrew
 
Can't answer most of your question, but I don't know of any dedicated com for this.
 
one way of doing without compont is

create a session value (randow number)

then write each part of that number 3230 = 3,2,3,0

either show as text and say write the number above below

or use an ASP Page to create an image content of that number . make the link of the image to the number .

then after submission check the value within the field that users have to enter the code into. against the one in the session Field. if they don't match send them away.

i supose you could use 4-6 digits of the session.SessionID value.

this prevents auto/forced submssions
 
Thats kinda the path I'm taking. Just fiddling around with ASPJpeg the now.

Persisting the random number/alphanumeric across two ASP pages was something I've been wondering about.

Classic ASP session work by giving each user a cookie, if users are blocking cookies then I'll have no way of comparing the numbers on each page.

So I'll have to do a cookie check first. :rolleyes:
I still don't like excluding users though...
 
you could collect eh IP Address, and store the value within a array or application Veriable

have to fields within the array (IP Address, Number value) then do a check on the array for the IP Address, if a match with IP and Value then ok else send them away

or application veriable

application("IPAddress") = "Value

if doesn't exist send them away IP Address is the uers IP Address not the wording "IP Addrerss" the value holds the random number
 
Ah, thats a much better plan.
I'll have to be carefull and make sure the application variables are properly disposed of otherwise they could be about for a while.

Are the application variables storedas/accessable as a collection?

I'm thinking of this:

1: generate random number
2: store number in application variable application("A0.0.0.0") = rnd
3: store datetime against ip & number application("B0.0.0.0") = datetime

4: check application("A0.0.0.0") against IP and run code

5: run cleanup code to remove all app vars older than 15 mins
 
i don't think so, i think its probbs best with an array. storing the cinents of the array within a applicatioin veriable.

i would use the IP Address as the identifer, then have random number and date and time.

i would set clean up after 10 mins,
 
Back
Top