';
$divw=''."\n";
$host_h_url='$host_h';
//直接输入 没有东西
if($referer==""):
if($_COOKIE["comment_author_" . COOKIEHASH]!=""):
echo $divt;
printf(__('Howdy, %s, welcome back!','philna'), $_COOKIE["comment_author_" . COOKIEHASH]);
echo $divw;
else:
echo $divt; _e('You direct access to my site! you remember my domain ? Thank you !','philna');echo $divw;
endif;
//没有东西
//搜索引擎
//baidu
elseif(preg_match('/baidu.*/i',$host_h)):
echo $divt; _e('You found me through Baidu,Congratulations! If you can Subscribe to my blog that would be fine','philna');echo $divw;
//google
elseif(!preg_match('/www\.google\.com\/reader/i',$referer) && preg_match('/google\./i',$referer)):
echo $divt; _e('You found me through Google,Congratulations! If you can Subscribe to my blog that would be fine','philna');echo $divw;
//yahoo
elseif(preg_match('/search\.yahoo.*/i',$referer) || preg_match('/yahoo.cn/i',$referer)):
echo $divt; _e('You found me through Yahoo,Congratulations! If you can Subscribe to my blog that would be fine','philna');echo $divw;
//阅读器
//google
elseif(preg_match('/google\.com\/reader/i',$referer)):
echo $divt; _e('Thank you for feed me by Google','philna');echo $divw;
//xianguo
elseif(preg_match('/xianguo\.com\/reader/i', $referer)):
echo $divt; _e('Thank you for feed me by XianGuo','philna');echo $divw;
//zhuaxia
elseif(preg_match('/zhuaxia\.com/i', $referer)):
echo $divt; _e('Thank you for feed me by ZhuaXia','philna');echo $divw;
//哪吒
elseif(preg_match('/inezha\.com/i', $referer)):
echo $divt; _e('Thank you for feed me by eZha','philna');echo $divw;
//有道
elseif(preg_match('/reader\.youdao/i', $referer)):
echo $divt; _e('Thank you for feed me by YouDao','philna');echo $divw;
//自己
elseif(self()):
echo ""."\n";
//友情链接
else:
if($_COOKIE["comment_author_" . COOKIEHASH]!=""):
echo $divt;
printf(__('Howdy, %s,','philna'), $_COOKIE["comment_author_" . COOKIEHASH]);
echo _e('welcome back from ','philna').$host_h.''.$divw;
else:
echo $divt;_e('welcome back from ','philna');echo $host_h.''.$divw;
endif;
endif;
}
//判断是自己的函数
function self(){
$local_info = parse_url(get_option('siteurl'));
$local_host = $local_info['host'];
//check self
if ( preg_match("/^http:\/\/(\w+\.)?($local_host)/",$_SERVER['HTTP_REFERER']) != 0) return true;
}
?>