ip-addr.php :
<?php
include 'ip.inc.php';
foreach($ip_block as $ipb)
if($ipb==$ip_addr)
{
die('<br><br><center><b>your ip is bloacked</center></b>').'<br>';
}
?>
<center><b><br><br>welcome world</center></b>
=========================================================
ip.inc.php :
<?php
$ip_addr=$_SERVER['REMOTE_ADDR'];
$ip_block=array('222.32.36.25');
?>
===========================================================
run " ip-addr.php "
output :
welcome world
note :
1) if your ip addsess is in block list then is displays " your ip is bloacked "
<?php
include 'ip.inc.php';
foreach($ip_block as $ipb)
if($ipb==$ip_addr)
{
die('<br><br><center><b>your ip is bloacked</center></b>').'<br>';
}
?>
<center><b><br><br>welcome world</center></b>
=========================================================
ip.inc.php :
<?php
$ip_addr=$_SERVER['REMOTE_ADDR'];
$ip_block=array('222.32.36.25');
?>
===========================================================
run " ip-addr.php "
output :
welcome world
note :
1) if your ip addsess is in block list then is displays " your ip is bloacked "