What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 128 Stack Exchange communities.

On this site if you do too many clicks or post comments too fast or something like that you get redirected to the "Are you a human" screen. Does anybody know how the developers of this site did this, or how to do something similar?

share|improve this question

migrated from stackoverflow.com Mar 4 '10 at 15:59

This question came from our site for professional and enthusiast programmers.

17  
Hey people, this doesn't belong on Meta! This is about verifying someone is human. They are just using SO as an example –  Earlz Mar 4 '10 at 15:56
    
@Earlz: That's not what the original question said, especially given the question title. –  Jon Seigel Mar 4 '10 at 15:58
    
This type of feature is known as annoying. –  JonH Mar 4 '10 at 15:59
    
Was about to add this on SO before it got migrated: stackoverflow.com/questions/tagged/captcha –  Jon Seigel Mar 4 '10 at 16:01
5  
And how do we get this migrated back to SO? This is a programming question, but just using SO as an example as per @earlz –  Rob Mar 4 '10 at 16:01
1  
@Jon Seigel. I believe the OP just didn't know how to properly phrase his question. I got from it that he was wanting to know how to implement Stack Overflow's feature. Not discuss it on Meta.. –  Earlz Mar 4 '10 at 16:02
    
@Rob: I don't see the point... either it belongs here to find out how it was done specifically on SO, or it's a duplicate of another question. –  Jon Seigel Mar 4 '10 at 16:02
2  
@Jon, I guess we'll have to agree to disagree then, as I just plain think it's a valid question for SO. Would it be "migrated to experts-exchange" if someone asked a question along the lines of "how do I design a Question & Answer website for programmers that's extraordinarily frustrating to use, in the same way as experts-exchange?" –  Rob Mar 4 '10 at 16:04
    
@Rob ahhhmmm you used the hyphen word :) (what, you don't like finding your question on google and having to pay to subscribe so you can see the answer? ) –  Earlz Mar 4 '10 at 16:06
    
@Rob I will try to ask it again on SO –  Omu Mar 4 '10 at 16:06
1  
@Jon Seigel if you meant the Captcha than I wasn't interested about that, I wanted to know how to know when some users do to many requests, acts like robot, stuff like that –  Omu Mar 4 '10 at 16:10
3  
@Omu, please don't repost. This should be migrated back to SO –  Nathan Koop Mar 4 '10 at 16:11
1  
@Nathan Koop is it possible to migrate it back ? –  Omu Mar 4 '10 at 16:13
2  
@Omu, I've flagged it for moderator attention.. I don't believe there is a "belongs on stackoverflow" close reason on Meta though, so it will require a mod. –  Earlz Mar 4 '10 at 16:16
2  
I've reopened the question, and made it less about Stack Overflow in particular - stackoverflow.com/questions/2380636/… –  Jonathan Sampson Mar 4 '10 at 16:43

4 Answers 4

up vote 5 down vote accepted

Now all this question needs is to be moved back to stackoverflow!

It's almost certainly a heuristic that tries to "guess" that a user is some form of automated process, rather than a person, for example:

  • More than "x" requests to do the same thing in a row
  • More than "x" actions in a "y" period of time

Ordinarily the "x" and "y" values would be formulated to be ones that it would be unlikely for a "real person" to do, like:

  • Editing the same answer 5 times in a row
  • Downvoting 10 questions within 1 minute

Once you've got your set of rules, you can then implement some code that checks them at the start of each request, be it in a method that's called in Page_Load, something in your masterpage, something in the asp.net pipeline, that's the easy bit! ;)

share|improve this answer

just check how many hit / minutes you get from a specific ip or session or whatever and decide what are your preferred threshold and your good to go

share|improve this answer

At a guess...

Write a HTTP handler that records requests and store them in session.

When a new request comes in, check to see how many requests are stored (and expire old ones).

If the amount of requests in the past few minutes exceeds a given threshold, redirect the user.

If you're doing this in ASP.NET webforms, you could do this check on the site master page, ( or write a IHttpHandler).

If you're using an MVC framework, you could write a base controller that does this check for every action.

With rails, you could write a before_request filter.

With asp.net MVC, you could write a [ActionFilterAttribute] attribute

share|improve this answer

I'd also check the user agent header of the request - if it doesn't look like a popular browser (or is empty) then throw the "are you a human?" page.

share|improve this answer
    
oh great, guess I can't use lynx! –  Earlz Mar 4 '10 at 16:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .