combine counter

PythonPython Forum LeaderThe Royal RAM
How can I combine the number of users online on the forum with the number of users online on the site?


on the site i need to display total number of users online but the forum counter can stay as it is.

is there a mysql bit of data i can access which contains how many people are online

The Royal Ram

Comments

  • ChroderChroder Senior Member The Royal RAM
    Get the numebr from phpBB itself, then you can get the value used from the website and add it.

    [code:1:fb0d6d48c7]$q = mysql_query("SELECT COUNT(*) AS onlineusers FROM phpbb_sessions WHERE session_time >= " . time() - 900); // 900 = 15 minutes
    $forumusers = mysql_fetch_row($q);
    $forumusers = $forumusers[0];

    // value from website added to get total
    $totalonline = $websiteonline + $forumonline;[/code:1:fb0d6d48c7]
  • PythonPython Forum Leader The Royal RAM
    ahh rite. thanks for that :)

    The Royal Ram

Sign In or Register to comment.