I am creating a website although during a trial run with a couple of friends they uncovered a bit of a major issue.... the ability to spam.
I have added a hidden box e.t.c. to attempt to prevent bots from spamming but my friends where able to post twenty messages in about one minute which obviously isn't good.

I am not entirely sure where this would go as it is a general sort of thread to do with Web Design so I placed it here.

Does anyone have any ideas on how I can either restrict the number of posts someone can send per minute (all forums require a login but the 'Contact Form' doesn't) or any other method I could use?


1)You can use captcha to stop bots from posting data into your thread.....
2)Use session for session if user is registered and once user post it,just set a session value to "some value" and before posting check the value of this session variable.

commented: good answer +5

There is more than one solution to the security issues with the contact form:
- captcha, as previously said (or another alternative, such as checkboxes to tick in order to prove the user is human)
- a script that will limit the number of acceptable submissions from the same IP per time unit. If you are on Asp.Net, this may help: http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/NoBot/NoBot.aspx

You could also do this :
1) make a captcha, like allready said.
2) make a ekstra "Submit" button... which i guess many "Spambots" jump to.
3) duplicate your form code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.