Home  >  Article  >  Backend Development  >  $_SERVER['regerer']的用法解决方法

$_SERVER['regerer']的用法解决方法

WBOY
WBOYOriginal
2016-06-13 13:38:54879browse

$_SERVER['regerer']的用法
比如我在每个页面都用$_SERVER['referer']验证用户过来的网址是不是我的页面
那如果用户是通过百度等搜索引擎过来的,那会通过这个验证吗?

如果不行的话要怎么排除这个问题呢?

谢谢!

------解决方案--------------------
好像是HTTP_REFERER吧?
------解决方案--------------------
只要是通过连接过来的,$_SERVER['HTTP_REFERER'] 都表示连接所在的页面
当然也可能用某种手段产生虚假的 $_SERVER['HTTP_REFERER']
------解决方案--------------------
是嘀,$_SERVER['HTTP_REFERER']可以伪造,如果重要判断,只能做为参考。
------解决方案--------------------
某种程度上用apache可以控制控制
------解决方案--------------------

探讨

引用:

基本上没有什么好的办法来解决你的需要。

那比如防盗链是怎么做的呢?
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