只允许iframe框架打开网站 禁止直接打开网站PHP代码

<?php 
if( $_SERVER['HTTP_REFERER'] == "" )
{
header('HTTP/1.1 403 Forbidden');
header("Content-Type:text/html;charset=utf-8"); 
echo '<body style="overflow:-Scroll;overflow-y:hidden" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#000000"><br></br></br></br>
<P align=center><FONT face=楷体_GB2312 size=6><B><font color="#FF0000">调用方式不正确请用iframe框架访问</font></FONT></P></B>';
exit;
}
?>
© 版权声明
THE END
喜欢就支持一下吧
点赞14 分享
相关推荐
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片快捷回复

    暂无评论内容