Поисковые роботы

Lange

Легенда
if(strstr($_SERVER['HTTP_USER_AGENT'], $bot['bot_agent']) <> FALSE)
[19-Mar-2012 16:49:21] PHP Notice: Undefined index: HTTP_USER_AGENT in /var/www/data/www//includes/page_header.php on line 29

Ерунда какая то...
 

[email protected].

Пользователь
Можно сделать так, в viewonline.php
PHP:
if(!$bot_active = CACHE('bb_cache')->get('active_bots'))
{
    $bot_active = DB()->fetch_rowset("SELECT bot_name, bb_visit FROM ".BB_BOTS." WHERE bb_visit > ".(time()-300));
    CACHE('bb_cache')->set('active_bots', $bot_active, 300);
}
меняем на
PHP:
$bot_active = DB()->fetch_rowset("SELECT bot_name, bb_visit FROM ".BB_BOTS." WHERE bb_visit > ".(time()-300));
 

KaTana

Пользователь
Пользуйтесь на здоровье, должно работать:
PHP:
if(!$bot_active = CACHE('bb_cache')->get('active_bots'))
{
$bot_active = DB()->fetch_rowset("SELECT bot_name, bb_visit FROM ".BB_BOTS." WHERE bb_visit > ".( TIMENOW - 300 ));
CACHE('bb_cache')->set('active_bots', $bot_active, 300);
}
$count = count($bot_active);
if($count>0)
{
foreach ($bot_active AS $key=>$row)
{
  $template->assign_block_vars('bots', array(
  'bb_visit' => bb_date($row['bb_visit']),
  'bot_name'  => $row['bot_name'],
  ));
}
}
 
Сверху