chekc robot
Posted by admin | Posted in PHP, SEO網站優化 | Posted on 04-03-2010
0
function is_bot(){
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
$botchar = 『/(baidu|google|spider|soso|yahoo|sohu-search|yodao|robozilla)/i』;
if(preg_match($botchar, $ua)) {
return true;
}else{
return false;
}
}
if(is_bot()){
header(’Location:http://blog.mm520.net);
}else{
header(’Location:http://www.google.com.tw’);
}












