bot anzeige
Verfasst: 30.10.2006 21:01
Hallo, also folgendes problem, erhiehlt ich nachdem ich diesen teil eines mods ausführte:
hinzugefügt, und es lief... ist das nun so eine saubere methode, oder sollte ich den mod ausbauen? - ich meine ich habe schon hunderte von mods eingebaut, und nie hat ich ein fehler, was mich jetzt schon ein wenig ins grübeln brachte. naja ich hab den ganzen abschnitt der page_header.php wieder rückgängig gemacht, und nach mod wieder neu eingebaut, aber fehler blieb.. ist das nun so gut?
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
$guests_online = 0;
#
#-----[ AFTER, ADD ]------------------------------------------
#
$bots_online = 0;
$bots_list = '';
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_ip
#
#-----[ IN-LINE FIND ]----------------------------------------
#
, s.session_ip
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, s.SearchBot
#
#-----[ FIND ]------------------------------------------
#
// Skip multiple sessions for one user
if ( $row['session_ip'] != $prev_session_ip )
{
$guests_online++;
}
#
#-----[ REPLACE WITH ]------------------------------------------
#
// Skip multiple sessions for one user
if ( $row['session_ip'] != $prev_session_ip )
{
$SearchBot = areyouabot($row['SearchBot'], FALSE);
if (!strlen($SearchBot))
{
$guests_online++;
}
else
{
$bot_array[$i] = $SearchBot;
$i++;
}
}
#
#-----[ FIND ]------------------------------------------
#
$prev_session_ip = $row['session_ip'];
}
$db->sql_freeresult($result);
#
#-----[ AFTER, ADD ]------------------------------------------
#
$all_bots = array();
$all_bots = array_count_values($bot_array);
while (list ($key, $val) = each ($all_bots))
{
if (strlen($bots_list) == 0)
{
$bots_list = $key . '(' . $val . ')';
}
else
{
$bots_list .= ', ' . $key . '(' . $val . ')';
}
}
$bots_online = count($all_bots);
dann habe ich einfach ein:Warning: array_count_values() [function.array-count-values]: The argument should be an array in C:\Programme\xampp\htdocs\xxxx\includes\page_header.php on line 181
Warning: Variable passed to each() is not an array or object in C:\Programme\xampp\htdocs\xxxxx\includes\page_header.php on line 182
Warning: Cannot modify header information - headers already sent by (output started at C:\Programme\xampp\htdocs\xxxxxx\includes\page_header.php:181) in C:\Programme\xampp\htdocs\xxxxx\includes\page_header.php on line 514
Warning: Cannot modify header information - headers already sent by (output started at C:\Programme\xampp\htdocs\xxxxx\includes\page_header.php:181) in C:\Programme\xampp\htdocs\xxxxxx\includes\page_header.php on line 520
Warning: Cannot modify header information - headers already sent by (output started at C:\Programme\xampp\htdocs\xxxxx\includes\page_header.php:181) in C:\Programme\xampp\htdocs\xxxxxx\includes\page_header.php on line 521
Code: Alles auswählen
$bot_array = array();