File size: 667B
<?php
define("MYSQLHOST", "localhost");
define("DBN", "chat");
define("DBUSER", "root");
define("DBPASS", "eipoquiev");
$dbcnx = mysql_connect('localhost', DBUSER, DBPASS) or die('Can not connect to MySQL');
mysql_query('SET NAMES `utf8`');
mysql_query("set character_set_client='utf8'");
mysql_query("set character_set_results='utf8'");
mysql_query("set collation_connection='utf8_general_ci'");
mysql_select_db(DBN) or die('Error select the database');
$qqq = mysql_query("SELECT COUNT(`id`) FROM `chat_users` WHERE `time` >= ".time().";");
$online = mysql_result($qqq, 0);
echo "<a href=\"http://chat.upwap.org\">Чат </a>(".$online.")<br/>";
?>