// ------------ FIND NETWORK COUNTRY AND AS ---------------------- $quads=explode(".",$_SERVER["REMOTE_ADDR"]); $rip=$quads[3].".".$quads[2].".".$quads[1].".".$quads[0]; $result3=dns_get_record($rip."."."origin.asn.cymru.com", DNS_TXT); $sep = explode(" | ", $result3[0]['txt']); $theCountry = $sep[2]; list($firstAS, $last) = explode(" | ", $result3[0]['txt']); $theASNumbr = "AS".$firstAS; $badCountries = array("CN","BR"); if (in_array($theCountry, $badCountries)) { echo $_SERVER["HTTP_HOST"]." (bc)";exit(); } ?>