最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
PHP实现禁止网外链接网址的方式查看网页
时间:2022-07-02 10:10:24 编辑:袖梨 来源:一聚教程网
// 禁止网外链接(例如搜索引擎)查看网页内容
if(!empty($_SERVER['HTTP_REFERER']))
{
preg_match("/^(http://)**?([^/]*+)/i",$_SERVER['HTTP_REFERER'], $matches);
$host = $matches[2];
if(($host=="211.152.50.35")||($host==www.phpv.net))
{
}
else
{
header("Location:http://www.p**h*pv.net");
exit;
}
}
// 禁止直接输入网址查看网页内容
else
{
header("Location:http://www.p**h*pv.net");
exit;
}
只有点击超链接(即
if(!empty($_SERVER['HTTP_REFERER']))
{
preg_match("/^(http://)**?([^/]*+)/i",$_SERVER['HTTP_REFERER'], $matches);
$host = $matches[2];
if(($host=="211.152.50.35")||($host==www.phpv.net))
{
}
else
{
header("Location:http://www.p**h*pv.net");
exit;
}
}
// 禁止直接输入网址查看网页内容
else
{
header("Location:http://www.p**h*pv.net");
exit;
}
只有点击超链接(即
相关文章
- 抖音如何修改抖音号 04-03
- 如何恢复文件传输助手文件 04-03
- 腾讯动漫-在线阅读免费漫画官网 04-03
- 小红书背景图设置不了怎么办 04-03
- 七彩云端如何发布信息 04-03
- b站官网地址是什么-b站官网直达入口 04-03