|
Home All Articles Contact Zawgyi Myanmar Font |
|
Home >> Snippet List >> Snippet Name Block IP AddressesDescription The above code creates an array of IP address to be blocked and checks the incoming address with array When an IP is matched, it will simply redirect to the address given (http://wwwmicrosoftcom/)PHP Snippet <?php $denyIP = array("IP Address 1", "IP Address 2", "IP Address 3"); IF (in_array ($_SERVER['REMOTE_ADDR'], $denyIP)) { header(”location: http://www.microsoft.com/”); EXIT(); } ?> |
|
All photograph,logos, articles, comments and trademarks etc, in this site are property of their respective owners.All the rest (c) 2006 by PhpMyanmar.com. |