[PHP Search] Record online

Hi,

Looking for php code, which shows max players online, example “Record online: 400” - and that this record is not resets after DC.

Thank!

[CODE]<?php

include(‘config.php’);

$link = @mysql_connect($host, $user, $pass);

if (!$link) {

echo “Ops - we have error right here!”;

} else {

mysql_select_db($dbname);

mysql_query(“SET NAMES $encoding”);

$query = mysql_query(“SELECT MAX(maxplayers) FROM uptime WHERE realmid = $realmid”);

$max = mysql_result($query,0);

echo “Max online: $max

”;

?>[/CODE]

config.php - default config file with host, user, pass, dbname, encoding and realmid.

[CODE]<?php

$host = “127.0.0.1”;

$user = “user”;

$pass = “password”;

$dbname = “auth”;

$encoding = “utf8”;

$realmid = “1”;

?>[/CODE]

thanks but need 1 line


echo "<b>Max online:</b> $max<br><br>";

}

?>