Oops, I’ve misunderstand the syntax of user agent tag. The following code can exclude most bot hits, with also Baidu search and Yahoo search.
if ( (stristr($useragent, "bot") === TRUE) || (stristr($useragent, "spider") === TRUE) || (stristr($useragent, "crawler") === TRUE) || (stristr($useragent, "baidu") === TRUE) || (stristr($useragent, "Yahoo! Slurp") === TRUE) )
$checkval = TRUE;
So replace it with the old one. If you are new, add this below these two lines (around line 377) in wp-content/plugins/counterize.php:
$excludelist=get_option(‘counterize_excluded’);
$checkval = strpos($excludelist, $remoteaddr);
Old version:
Exclude Bot Hits from Counterize









代码中的引号应为‘,而非‘或’
不好意思,请忽略以上留言。
我发现这个留言系统总是把代码中的“单引号(ASCII为39)”转换成UTF-8里面的“文书单引号”。
我還是 PHP 新手呢,在 PHP 中使用單引號及雙引號不是一樣的嗎? @@"