Home  >  Article  >  php教程  >  php防盗链

php防盗链

WBOY
WBOYOriginal
2016-06-06 19:54:371070browse

?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协议修改否则就可以了


Statement:
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