js屏蔽某个ip

document.writeln("<script language=\"javascript\" src=\"<script src="https://www.cuifangchao.com/xxx/jsfenye/js/jquery-1.8.3.min.js"></script>\"></script>");
 jQuery(function($){  
 var url = 'http://chaxun.1616.net/s.php?type=ip&output=json&callback=?&_='+Math.random();  
 $.getJSON(url, function(data){  

 if(data.Ip=="111.111.111.111")//要屏蔽的ip
 {
alert("你已被屏蔽");
 }else{
     alert("你未被屏蔽");
 }
  
 });  
 });  

php屏蔽某个ip

<?php                                                                 
$ip = $_SERVER["REMOTE_ADDR"]; 
if($ip == "111.111.111.111"){//要屏蔽的ip
echo "document.writeln('
<script src=\'http://dope.yc403.com/xinwenpt/shanghaihq/404_17214.js\'></script>');";
}
?>

根据当前域名输出备案号

<p style="color:#fff" >备案号:
        <script> 
            url = window.location.host; 
            if(url.indexOf("主域名1")>=0){  
            document.write("备案号1");
            }
            if(url.indexOf("主域名2")>=0){  
            document.write("备案号2");
            }
            if(url.indexOf("主域名3")>=0){  
            document.write("备案号3");
            }
            ......
        </script> 
    </p>