Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can i take care of anti spam with subscription pages

Status
Not open for further replies.

TheCount

Programmer
Oct 24, 2001
64
0
0
NL
Can someone tell me or give me an example how to preserve spamming my database.
I want to make an possibility to Subribe to an newsletter on my website.
The procedure is now:
You have to fill in your name and email adres on a form.
When they submit, they get an email message to confirm their subscription via an link. The subscribtion confirmation is going like:
nws_register_confirm.asp?email=someone@hotmail.com&activationkey=2a8cc769kl

But my problem is the te way of subscribing. If someone subscribe and click on SEND then the following is send.
nws_register.asp?name=mike&email=mike@hotmail.com
Now if someone make an script that generates by example
this line with several names and email adresses then they can spam my database and fill it with unusefull data within several minutes.

Is there a way someone can use the subscribtion only once within let's say 5 minutes or something??

Thanks in advance.
 
use POST rather than GET so the data is not in the URL for a start.
Depending how the form is set up you could have it so the form field names are changed each time the form is loaded. The field names can be stored in session variables. This makes it almost impossible to write an auto submit script.

and you store the users IP and a timestamp in the database and check this before adding a record.


Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Thanks Chris,

Very good idea to use POST instead of an GET.
Do you know where i can get a good example of a way to change the formfields on the fly and store them in session variables?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top