كود لاعطاع banned لشخص
			 
			 
			
		
		
اولا :: 
  
قوم بعمل ملف ونسمية مثلا ban.php 
ثانيا نروح للهيدر ونضع اعلاه هذا الكود require('ban.php')  
 
ثاليا :: نفتح الملف ban.php وتضع فيه الكود التالى  
  
<?php 
// For a single user ban 
$ban_ip = 'xxx.xxx.xxx.xxx'; // ip address of the person you want to ban  
 
 
// DO NOT EDIT BELOW HERE UNLESS YOU KNOW WHAT YOU ARE DOING 
$visitor_ip = $_SERVER['REMOTE_ADDR']; // the ip address of the visitor 
if($visitor_ip == $ban_ip) 
{ 
die("You are banned from this site!"); 
} 
 
// For a multiple user ban 
$ban_ip = "xxx.xxx.xxx.1,xxx.xxx.xxx.2"); // put ip addresses, separated by commas 
// DO NOT EDIT BELOW HERE UNLESS YOU KNOW WHAT YOU ARE DOING 
$visitor_ip = $_SERVER['REMOTE_ADDR']; 
$ip_list = explode(",", $ban_ip); 
foreach($ip_list as $ip) 
{ 
if($visitor_ip == $ip) 
{ 
die("You are banned from this site!"); 
} 
} 
 
?> 
  
منقول للافادة  فقط 
		
 
 
 
 
 
		
		
		
 
 
		
			 
		
		
		
		
		
		
		
			
			
			
			
			
			
			
			
            
            
                
           	
			
			
		 
	
	 |