当前位置: 代码迷 >> HTML/CSS >> html兑现跳转
  详细解决方案

html兑现跳转

热度:95   发布时间:2012-07-31 12:33:46.0
html实现跳转
之前有用PHP实现过:

<?php

$file="http://www.xyz.com";
$referer=$_SERVER["HTTP_REFERER"];
$agent= strtolower($_SERVER["HTTP_USER_AGENT"]);


if(ereg("http://www.baidu.com/search/spider.htm",$agent))
{


$content=file_get_contents($file);
echo $content;

  exit;

}
?>

请问能用HTML实现吗?

------解决方案--------------------
客户端需要使用js实现,那些蜘蛛是不能执行js代码的,所以,客户端不行。需要代码或者服务器上设置
------解决方案--------------------
能!把下面的代码放到<head></head>之间
<meta http-equiv="refresh" content="5;url=111.html"> 
5秒后跳转到111.html
结贴吧
  相关解决方案