elliottbenzle
asked on
Prevent spammers from abusing post pages
I have a few pages which allow users to upload entries into the database for apartment postings etc. I have seen a few similar sites which have been over run by people posting huge lists of links to porn pages etc. I would like to allow users to post without making them create a user id and password which they would have to use to sign in every time. There are two questions here. First: why do people want to post web links like this and Second: Is there a way to prevent this without creating a user id password feature for all users? Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
My pages usually use ASP so I coded to avoid certain strings. For instance:
unwantedStrings = Array(".com", ".net", ".org", ".edu", ".info", "http:", "https:", "ftp:")
For Each formElement In Request.form
formValue = Request.form(formElement)
For each str in unwantedStrings
If InStr(formValue, str) > 0 Then
weHaveTrouble = "yes"
badString = str
End If
Next
Next
If weHaveTrouble = "yes" Then
Response.write("This is inappropriate. You should not enter <b>'" & badString & "'</b> into the form!")
Response.end
End if
unwantedStrings = Array(".com", ".net", ".org", ".edu", ".info", "http:", "https:", "ftp:")
For Each formElement In Request.form
formValue = Request.form(formElement)
For each str in unwantedStrings
If InStr(formValue, str) > 0 Then
weHaveTrouble = "yes"
badString = str
End If
Next
Next
If weHaveTrouble = "yes" Then
Response.write("This is inappropriate. You should not enter <b>'" & badString & "'</b> into the form!")
Response.end
End if
Hi elliott,
If your form pages are public, sooner or later spammer spiders will index them and automated scripts will start abusing them. The inputting of the random string from an image is called a CAPTCHA and you can find more info on them here:
http://www.google.com/search?q=asp+CAPTCHA
Basically, a random string is generated and stored in a variable on the server and is then displayed as an image to prevent spiders from reading the text. The form fails unless the text on the image is entered into a textbox.
If your form pages are public, sooner or later spammer spiders will index them and automated scripts will start abusing them. The inputting of the random string from an image is called a CAPTCHA and you can find more info on them here:
http://www.google.com/search?q=asp+CAPTCHA
Basically, a random string is generated and stored in a variable on the server and is then displayed as an image to prevent spiders from reading the text. The form fails unless the text on the image is entered into a textbox.
I agree with jason1178...Captcha is good if you want random people to add info to your site.
However, consider the use of a member database. This way, you will be able to maintain an ever growing collection of prospective users. You most certainly can use that list for marketing, promo, or simply pass information to the original poster.
However, consider the use of a member database. This way, you will be able to maintain an ever growing collection of prospective users. You most certainly can use that list for marketing, promo, or simply pass information to the original poster.
cool. thank you
ASKER