This little hack will show which bots are currently indexing your site. It uses the gl_sessions table. Just add the code listed below between the two snippets in function phpblock_whosonline in lib-common.php.
Text Formatted Code
$result = DB_query( "SELECT DISTINCT uid,remote_ip FROM {$_TABLES['sessions']} WHERE uid = 1" );
$num_anon += DB_numRows( $result );
<--------- Dont add the code above its just for reference
for( $i = 0; $i < $num_anon; $i++ ) {
$A = DB_fetchArray( $result );
if(ereg("(^216.239.46|^64.68.8|^66.249.[64-95])",$A['remote_ip'])) {
if ( !(strstr($retval,"Google")) ) {
$retval .= "Google" . '<br>';
}
--$num_anon;
}
if(ereg("(^68.142.[192-255])",$A['remote_ip'])) {
if ( !(strstr($retval,"Yahoo! Slurp")) ) {
$retval .= "Yahoo! Slurp" . '<br>';
}
--$num_anon;
}
if(ereg("(^216.109.[112-127])",$A['remote_ip'])) {
if ( !(strstr($retval,"Yahoo! Feed")) ) {
$retval .= "Yahoo! Feed" . '<br>';
}
--$num_anon;
}
if(ereg("(^64.4.8.[93-94]|^64.4.8.[113-117]|^65.54.164.[36-135]",$A['remote_ip'])) {
if ( !(strstr($retval,"MSN Bot")) ) {
$retval .= "MSN Bot" . '<br>';
}
--$num_anon;
}
}
<-- Dont add the code below, its just for reference
if(( $_CONF['whosonline_anonymous'] == 1 ) &&
( empty( $_USER['uid'] ) || ( $_USER['uid'] == 1 )))
The strstr function insures that the bot is only listed once, but yet all of its IP addresses that are currently hitting your site is subtracted from the total anon users.