Previously implemented with 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;
}
?>
Can this be implemented using HTML?
The client needs to use js to implement. Those spiders cannot execute js code, so the client cannot. Requires code or server settings
Yes! Put the following code between