IP Ban for website

PHP:
<?php
$idunwantyou = array('127.0.0.1','87.209.160.22'); // Seperate with ,
$ip = $_SERVER['REMOTE_ADDR'];
if(in_array($ip,$idunwantyou)){
die('Ip banned');
}
?>
 
Upvote 0
Back