Home > php教程 > php手册 > php防盗链

php防盗链

WBOY
Release: 2016-06-06 19:54:37
Original
1133 people have browsed it

?php if(isset($_SERVER['HTTP_REFERER'])){ //取出来 //判断$_SERVER['HTTP_REFERER']是不是以http://localhost/http_开始-函数 if(strpos($_SERVER['HTTP_REFERER'],http://localhost/http)==0){ echo 韩顺平的账号信息; }else{ header(Location:warning.p


if(isset($_SERVER['HTTP_REFERER'])){

//取出来

//判断$_SERVER['HTTP_REFERER']是不是以http://localhost/http_开始->函数

if(strpos($_SERVER['HTTP_REFERER'],"http://localhost/http")==0){

echo "韩顺平的账号信息";

}else{

header("Location:warning.php");

}

}else{

header("Location:warning.php");

}


?>


除非是技术很强的可以将http协议修改否则就可以了


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template