php - Prevent search abuse -
I'm unable to do something useful on this topic, so I appreciate the links to articles related to this topic, Or straight answers are here, either okay.
I am implementing a search system on a site in PHP / MySQL that has a lot of visitors, so I have some restrictions the length character of a visitor is allowed to enter the search field and two searches Required minimum time between Since I am new to these problems and why I do not really know the "real cause" why this is usually done, it is only my impression that the character applies to the minimum length to reduce the number of results in the database , And the spamming of the search system prevents the time between searches to prevent robots and slow down the site. Is it true?
And finally, the question of applying the minimum time between the two searches. Set a test cookie on the URL where redirect the user to
- If not, the output is warned that it is not allowed to use the search system (possibly a robot) <
- Check if a cookie Is present which indicates the time of last search
- If it was low that 5 seconds ago,
- Search
- set the cookie at the last search for the current time
- Output Search Results
Is this the best way to do this?
I understand that this means that the visitors who have been disabled will not be able to use the search system, but is this really a problem? I could not get the 2012 figures, but I got the information that 3.7% of people had disabled cookies in 2009. It seems that there is not much else and I think that these days may be less.
"Only my impression is that to minimize the number of results to apply the character minimum length Is implemented for ". Your impression is absolutely correct, it reduces the number of possible outcomes, by compelling the user to think about it, what they want to find out.
As far as your search is spam bots, you can apply it, the most used to be if you do not want to immediately show a captcha, you searched the user You can track the number of times (and through the session), and if the amount of X is within a specific time range, then present the captcha.
I have implemented such a strategy with sites such as SA and Thichivite dynamite, where Captcha is not immediately given, but if any threshold is revealed then it will be provided.
Comments
Post a Comment