D
D
Dmitry Morozov2011-11-25 13:09:09
Web development
Dmitry Morozov, 2011-11-25 13:09:09

How to prevent access to the site to users with a certain language?

The task is simple - hundreds of Chinese are pouring into the site a day. I am sure that this is a traffic surge by one unscrupulous office that wants to increase the attendance rates for the client. Blocking by IP is not a hunt, you need to fasten geoip. It is much easier to slash users with the Chinese language installed. but how to do that?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Andrey Burov, 2011-11-25
@BuriK666

chop them by Accept-Language, sometimes the language is specified in the User-Agent.

D
Dmitry Morozov, 2011-11-25
@saytik

Thank you! Made. check now =)

A
AlexanderPHP, 2011-11-25
@AlexanderPHP

Well, or it’s trite to just use geoip, but one problem is that you need to update the ip database often.

A
ainu, 2011-11-25
@ainu

GEOIP in nginx is configured in half an hour and keeps foreign DDoS with a bang.

V
volnov, 2011-11-26
@volnov

GEOIP will give information about the IP, but not the fact that the user's language will be appropriate. So only on the user-agent.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question