Author

Topic: Block Country From My Faucet (Read 251 times)

legendary
Activity: 1120
Merit: 1000
May 25, 2016, 08:09:56 PM
#3
you can easly block em by Country !
if your are a litte proofed in php this should be no problem !

this i only tipped here not testet !!
Code:

function checkVisitor($ip){
$query = @unserialize(file_get_contents('http://ip-api.com/php/'.$ip));
if($query && $query['status'] == 'success') {
if(strpos($query['country'],'Ukraine')!==false) { return true; }
} else { return false;}
}


if you need some help call me Wink

kind regards

cool thanks. thats close to the one i was looking for. il give it a go see what happens
legendary
Activity: 1582
Merit: 1031
May 25, 2016, 05:42:06 PM
#2
you can easly block em by Country !
if your are a litte proofed in php this should be no problem !

this i only tipped here not testet !!
Code:

function checkVisitor($ip){
$query = @unserialize(file_get_contents('http://ip-api.com/php/'.$ip));
if($query && $query['status'] == 'success') {
if(strpos($query['country'],'Ukraine')!==false) { return true; }
} else { return false;}
}


if you need some help call me Wink

kind regards
legendary
Activity: 1120
Merit: 1000
May 25, 2016, 04:37:13 PM
#1
hi guys. I remember seeing somewhere there was a little php snippet of code that blocks entire county but i have not been able to find it again, anyone know got a link to it please?
Jump to: