PHP Code:
//=== stop banned IPs
$nip = ip2long($ip);
$res = mysql_query("SELECT id FROM bans WHERE $nip >= first AND $nip <= last")or sqlerr(__FILE__,__LINE__);
$res21 = mysql_query("SELECT id FROM seedbox_white_list WHERE $nip = first")or sqlerr(__FILE__,__LINE__);
if (mysql_num_rows($res) > 0 && mysql_num_rows($res21) <1)
{
$fp = fopen ('hacklog.txt', 'a');
fwrite ($fp, 'IP - ' . $_SERVER['REMOTE_ADDR'] . ' Announce Tracker Banned IP<br><br>');
fclose ($fp);
err("Banned IP ...Please Cantact Staff If You Wish To Sort This Out");}
My own Version in announce....
Looks to see if banned.....Then see's if it's also in the allowed list.....if not reports to log file and informs them via client they are banned