SO 1-final
[specialops1.git] / extfuncs.inc.php
blob7e26f2df77aa8107a333ea947890b1fa21b88bbb
1 <?php
2 function check_ua()
4 $uas = array (
5 'AOL',
6 'MSIE'
7 );
8 foreach ($uas as $blocked_ua)
9 if (strpos ($_SERVER['HTTP_USER_AGENT'], $blocked_ua) !== false)
10 return $blocked_ua;
13 function check_isp()
15 $hostname = gethostbyaddr ($_SERVER['REMOTE_ADDR']);
16 $isps = file ('include/isp_bans.txt');
17 foreach ($isps as $blocked_isp)
18 if (strpos ($hostname, $blocked_isp) !== false)
19 return true;
22 function check_email ($email)
24 $emails = file ('include/email_bans.txt');
25 foreach ($emails as $blocked_email)
26 if (strpos ($email, rtrim ($blocked_email)) !== false)
27 return true;
30 function check_ip()
32 $isp = gethostbyaddr ($_SERVER['REMOTE_ADDR']);
33 if (strpos ($isp, 'ntli.net') || strpos ($isp, 'ntl.com')) // NTL is a retarded ISP
34 return false;
35 $ips = file ('compress.zlib://include/proxylist.txt.gz');
36 foreach ($ips as $blocked_ip)
37 if (strpos ($_SERVER['REMOTE_ADDR'], rtrim ($blocked_ip)) === 0)
38 return true;