Quick Search:
Oracle PL/SQL Code Library
Find Or Post Oracle Jobs
Oracle Discussion & Chat
 PHP Code: Block IP Addresses Jump to:  
Category: >> PHP Code >> Block IP Addresses Bookmark and Share

<< lastnext >>

Snippet Name: Block IP Addresses

Description: 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://www.microsoft.com/).

Also see:
» Censor Message Text
» Vulnerability Tester
» Ban Proxy Servers
» Bad Word Filter
» Anti-Flood Protection
» Anti-SQL Injection Function
» XSS Sanitizer Function
» Filter non-alphanumeric characters

Comment: (none)

Language: PHP
Highlight Mode: PERL
Last Modified: March 16th, 2009

$denyIP = array("IP Address 1", "IP Address 2", "IP Address 3");
IF (in_array ($_SERVER['REMOTE_ADDR'], $denyIP)) {
    header(”location: http://www.microsoft.com/);

Oracle Magazine
and Oracle White Papers

SQL University.net courses meet the most demanding needs of the business world for advanced education in a cost-effective manner. SQL University.net courses are available immediately for IT professionals and can be taken without disruption of your workplace schedule or processes.

Compared to traditional travel-based training, SQL University.net saves time and valuable corporate resources, allowing companies to do more with less. That's our mission, and that's what we deliver.

Click here to find out more
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 24 users online    © 2009 psoug.org

Forgot your password?