<?
include 'config.php';
$online = mysql_result(mysql_query("SELECT count(*) FROM `profile` WHERE `time` > '".(time()-600)."' ORDER BY `time`"), 0);
if($online>$config['max_online']){
    mysql_query("UPDATE `config` SET `max_online` = '".$online."', `date_online` = '".mktime()."'");
}
?>