Home > php教程 > php手册 > php如何判断来访网页地址

php如何判断来访网页地址

WBOY
Release: 2016-06-13 09:29:05
Original
1374 people have browsed it

php如何判断来访网页地址

   php如何判断来访网页地址:

  php利用系统函数"HTTP_REFERER"判断来访的网页地址

  如注册用户时必须是来自某网址的

  $str=@$_SERVER[’HTTP_REFERER’];//@为除错功能

  if(strstr($str,www.code-123.com))//

  echo "来自 www.code-123.com";

  else

  echo "其它网址";

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