Hi guys! Can anybody tell me how can I configure my website to stop showing AdSense for chinese visitors? There is a probability that someone from China may try to do harm to me. Thank you
topr8
9:11 am on Aug 5, 2019 (gmt 0)
you need to have access to a geolocation database.
there are various ways of aquiring one for your own server. (both paid and free)
alternatively various companies offer a free API which you can use (usually limited in number of calls per month after which you have to pay)
use this to work out if the user is from china and then use php to not serve the adsense code on your page at the server level.
If you can't use Geo IP db, you can more or less guess visitors from China, by looking at the reverse DNS of their IP and analysing the "accept-language" header field. But this can be too approximation and inaccurate , especially if someone is , on purpose, trying to harm you (he will be "smart" enough to send false information).
If someone is really involved in harming you, he will certainly do it also from other countries.