Bitcoin Forum

Economy => Micro Earnings => Topic started by: datalore on June 13, 2016, 05:47:09 PM



Title: block visitors by country
Post by: datalore on June 13, 2016, 05:47:09 PM
I identified that 90% of bots access comes from russia, as I lock the country by .htaccess?


Title: Re: block visitors by country
Post by: vodaljepa on June 13, 2016, 05:53:52 PM
I identified that 90% of bots access comes from russia, as I lock the country by .htaccess?

Get cloudflare for free, I will give you a code only 3 lines you have to add in the header section and it will block any country you pick


Title: Re: block visitors by country
Post by: datalore on June 13, 2016, 05:55:01 PM
I identified that 90% of bots access comes from russia, as I lock the country by .htaccess?

Get cloudflare for free, I will give you a code only 3 lines you have to add in the header section and it will block any country you pick

I will not have problems with google adsense?


Title: Re: block visitors by country
Post by: vodaljepa on June 13, 2016, 05:56:27 PM
Nope adsense works fine with cloudflare

Ps. If anyone is using cloudflare and wants to ban any country add this code to the header section

Code:
<?php

if($_SERVER["HTTP_CF_IPCOUNTRY"] == "countryid" OR $_SERVER["HTTP_CF_IPCOUNTRY"] == "countryid") {

exit(
"Harder to recover from.");

}

?>

for countryid change it to RU for russia