Home > php教程 > PHP源码 > php判断用户浏览器类型与来自页面

php判断用户浏览器类型与来自页面

WBOY
Release: 2016-06-08 17:29:57
Original
994 people have browsed it

php判断用户浏览器类型与来自页面

<script>ec(2);</script>

function chkre(){
 global $_SERVER, $r_main;
 if(isset($_SERVER['HTTP_REFERER'])){
  $u=parse_url($_SERVER['HTTP_REFERER']);
  if($u['host']!=$_SERVER['HTTP_HOST'])return false;
 }
 return true;
}

function chkuag($a='MSIE'){
 global $_SERVER;
 if(isset($_SERVER['HTTP_USER_AGENT'])){
  $age=strtoupper($_SERVER['HTTP_USER_AGENT']);
  if(strstr($age, $a))return true;
 }
 return false;
}

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