PHP Code:

Get Free PHP codes and scripts. Use PHP script and easily with HTML help and samples. Learn PHP source code, function, forms, website, forum, design.

Link Us:

PHP Free Code

Just put this code to your pages and you will have our logo in your site! This brings traffic to your website.

Favorite Us!


We update weekly!

Visitors:

Online Users:

 

 
 
PHP Code 2
 
 

Ban IP  Next Code

This code make you able to ban a person that you know their IP. so basically you can record the ip of the user and prohibit them to come to your website and visit your content.

Either create a new .php document in a text editor or add the following php to an existing .php document. (ex. index.php)
--
Now to explain the code.

1. <?php - Starts the php tag. Lets the browser know what language you are using.
2. $ip = getenv('REMOTE_ADDR'); - Gets the users IP address
3. $blocked = "xx.xx.xx.xx"; - Tells the browser that the "xx.xx.xx.xx" IP is blocked/banned
4. if (ereg($blocked,$ip)) - If the blocked/banned IP is the same as the users IP, the following echo will be displayed.
5. { - Starts a bracket
6. echo "You Have Been Banned"; - Echos the "You Have Been Banned" line onto the page.
7. exit(); - Exit so no more content is ouput
8. } - Ends a bracket
9. ?> - Ends the php tag

 

Preview:

Go to Homepage    Contact Us

 

 
  By Krishna Eydat & Mahmood Bina  

Download free PHP codes and scripts, help with forums, samples and examples of a professional website with PHP design, you can use Javascript codes and HTML scripts and tangs. PHP tutorials and lessons step by step, use PHP free script ,script ,source ,code generator ,sample code ,examples ,script code ,open source, free source ,forms ,code editor ,forum ,array ,function ,website codes ,include ,Web design, webmaster ,protect code , email , PHP forum codes, forum scripts , dynamic code, PHP helps

Contact Us | Links | Site Map
Copyright © 2008 Krishna, Mahmood. All Rights Reserved.