自动识别WEB/WAP并跳转到相应目录

@Ta 2013-01-12 5290点击
<% 


Option Explicit
dim enterurl



if instr(Request.ServerVariables("http_accept"),"wap")>0  then

    enterurl="http://wap.hu60.cn"    
else

    enterurl="http://www.hu60.cn"        
end if

Response.Redirect(enterurl)
%>


---------------


<?php

$iswap = $_SERVER['HTTP_ACCEPT']; 
if(strpos($iswap,"wap")>0)
{
   header("location:http://wap.hu60.cn");
}
else 
{
   header("location:http://www.hu60.cn/");  
}

?>


不懂得请多多百度,第一个为asp格式 第二个为php格式 
回复列表(13|隐藏机器人聊天)
添加新回复
回复需要登录