Salve sul mio sito si registrano utenti che non si devono registrare (non sono bot) del Bangladesh vorrei che chi è del Bangladesh non vede la pagina ho provato questo codice:
http://pastebin.com/gcLi0LJY
però non funzionaCodice:<? $IPaddress=$_SERVER['REMOTE_ADDR']; $two_letter_country_code=iptocountry($IPaddress); if ($two_letter_country_code=="BD"){ die('DB'); } function iptocountry($ip) { $numbers = preg_split( "/\./", $ip); include("ip_database.php"); $code=($numbers[0] * 16777216) + ($numbers[1] * 65536) + ($numbers[2] * 256) + ($numbers[3]); foreach($ranges as $key => $value){ if($key<=$code){ if($ranges[$key][0]>=$code){$two_letter_country_code=$ranges[$key][1];break;} } } if ($two_letter_country_code==""){$two_letter_country_code="unkown";} return $two_letter_country_code; } ?>

LinkBack URL
About LinkBacks
