$ips = array_reverse(explode('.', $_SERVER['REMOTE_ADDR'])); if (gethostbyname(join('.', $ips) . '.dnsbl.spam-champuru.livedoor.com') == '127.0.0.2') { die('Your IP Address has been Blacklisted!'); }