标签 php判断 下的文章
php和asp判读蜘蛛与人工浏览,用于备案
php代码: 说明:header("Location:default.php".$_SERVER['REQUEST_URI']); 要跳转到新的页面去。当然也可以echo出来。可参考eot写法,此处不举例了。 asp代码:0 then GetBot="google" end if if instr(1,s_agent,"msnbot",1) >0 then GetBot="MSN" end if if instr(1,s_agent,"slurp",1) >0 then GetBot="Yahoo" end if if instr(1,s_agent,"ba...
PHP判断来访国内国外IP
1. Javascript判断来访者的浏览器语言,如果是中文系统,自然使用者都是中国人,跳中文网站;如果是非中文系统,默认使用者非中国人,跳英文网站。优点:判断反映速度快。缺点:不准确,有可能中国用户喜欢用英文版系统,或者外国人使用中文系统的情况。 var Browser_Agent = navigator.userAgent; //浏览器为ie的情况 if(Browser_Agent.indexOf("MSIE")!=-1){ var a=navigator.browserLanguage; ...