Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (24 sloc) 533 Bytes
<?
$kosher_ips = array(
"/^192.168.0.\d{1,3}$/",
"/71.212.108.201/", // joe's home machine
"/72.130.115.108/", // ?
"/168.158.197.140/", // ?
"/12.184.62.130/", // St. louis airport - delete me
);
$remote_addr = $_SERVER["REMOTE_ADDR"];
$restricted = true;
foreach($kosher_ips as $pattern)
{
if(preg_match($pattern, $remote_addr))
{
$restricted = false;
break;
}
}
if($restricted)
{
echo "<center><div style='margin:10%'>Access not allowed for IP<br>$remote_addr";
exit;
}
?>
Something went wrong with that request. Please try again.