Quote:
Originally Posted by warescouse
|
Now I think about it I did something similar in PHP for the Parasites team... (Its running on Wintel but has PHP).
Its very easy to do with pattern matching (if you're into regular expressions like me);
// Set banned IP range
// Phorm Comcast; 71.224.0.0-71.225.255.255 (71.225.148.61)
// Phorm HT Systems; 78.110.48.0-78.110.55.255 (78.110.48.130)
$targetAddr = array ("^71\.22[45]\.","^78\.110\.4[89]\.","^78\.110\.5[012345]\.");
foreach($targetAddr as $var)
{ if (ereg($var, $_SERVER['REMOTE_ADDR']))
{ echo "<html><head>";
echo "<meta http-equiv='refresh' content='2;url=http://www.google.com/search?q=fleas'>";
echo "<title>Scratch that itch!</title></head><body>";
echo "<p><img src='/images/flea.png' align='middle'><br/>Sorry, there seems to be a bug in our code.<br/>Thanks for jumping by.</p>";
echo "</body></html>";
exit;
}
}//End banned IP range