CoZmicShReddeR
10-07-2010, 08:24 AM
I am trying to set this as a widget but the output keeps getting pushed up to the top of the website
Script originally found at:
http://clientforums.tcadmin.com/showthread.php?t=4766&highlight=players
<?php
$db_user = "tcadmin_stats";
$db_password = "yourpassword";
$db_name = "tcadmin";
$db_server = "localhost.";
$conn = mysql_connect($db_server, $db_user, $db_password) or die();
mysql_select_db($db_name, $conn);
$query = "SELECT PERF_DATE, SUM(AVERAGE_PLAYERS) FROM tc_service_performance WHERE PERF_DATE = ( SELECT PERF_DATE FROM tc_service_performance ORDER BY PERF_DATE DESC LIMIT 1 ) GROUP BY PERF_DATE" ;
$result = mysql_query($query);
$current_players = mysql_result($result,0,1);
mysql_close($conn);
echo "Current players on our network: $current_players";
?>
It's a script someone released at tcadmin.com to show how many players are on all your servers that you host...
Could someone please give me a clue how to make the output stay within the widget?
Script originally found at:
http://clientforums.tcadmin.com/showthread.php?t=4766&highlight=players
<?php
$db_user = "tcadmin_stats";
$db_password = "yourpassword";
$db_name = "tcadmin";
$db_server = "localhost.";
$conn = mysql_connect($db_server, $db_user, $db_password) or die();
mysql_select_db($db_name, $conn);
$query = "SELECT PERF_DATE, SUM(AVERAGE_PLAYERS) FROM tc_service_performance WHERE PERF_DATE = ( SELECT PERF_DATE FROM tc_service_performance ORDER BY PERF_DATE DESC LIMIT 1 ) GROUP BY PERF_DATE" ;
$result = mysql_query($query);
$current_players = mysql_result($result,0,1);
mysql_close($conn);
echo "Current players on our network: $current_players";
?>
It's a script someone released at tcadmin.com to show how many players are on all your servers that you host...
Could someone please give me a clue how to make the output stay within the widget?