¿Cómo evitar envíos repetidos de publicaciones?

I have a form that allows users to paste input, like on StackOverflow. But if users know the format I send to the server, they can keep sending requests to me. How can I ensure it is a real user sending a request instead of some kind of machine attack to insert information?

preguntado el 27 de agosto de 11 a las 16:08

Can't you use a captcha to require human interaction? en.wikipedia.org/wiki/CAPTCHA -

When you say "user" do you mean a logged-in user? -

Did you already check related questions like those shown on the right side of this page? ¿Cómo evitas que los scripters golpeen tu sitio web cientos de veces por segundo? seems promising. -

3 Respuestas

There are a load of ways to do this and employing a large variety of different things is a good idea to protect against spam.

What stackoverflow does (from my experience) is if there is an abnormal amount of posting, or maybe the posts are very short, or something else is a bit suspicious then they use a capcha.

You can monitor this by using cookies, for instance monitoring the time between posts is a good indicator that someone is spamming. Similarly if the lengths of the messages posted are all about the same length, or include the same url/link or something you can also display a capcha to test if the user is a human or not.

Respondido 27 ago 11, 20:08

Puedes utilizar una Captcha. That's probably the most common approach.

Respondido 27 ago 11, 20:08

But before I use captcha, how can I track the user keep sending request to me? As you can see, most of the site won't ask u to do captcha, until u keep trying for 3-4 times in a short time. - DNB5brims

That's a completely different and much more general question. A user can send a request to and page on your site. It doesn't have to be just the "post submission" related pages. - Emanuil Rusev

Here's a question that may give you some helpful ideas on the subject: stackoverflow.com/questions/8472/… - Emanuil Rusev

There are different techniques allowing you to achieve this with more or less success. Using a Captcha is one popular way used by many sites.

Respondido 27 ago 11, 20:08

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.