• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[REQUEST] Online-list

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,775
Solutions
25
Reaction score
483
Location
Sweden
Simply, a php function that can show Who is online in my website, if it's more complicated than a simple phpscript, please post it here anyway! Thanks:wub:
 
Example: Tibia has a list that shows who is online on each worlds. This list shows Name Vocation and Level.
 
Yea, well nevermind that, I need to know how to add certain things in databases.

Like I wanna add a new column in players table
~
 
I tried adding a new column, still didn't work with "Who is online". And I need Nicaws Online list, can find it anywhere. (Geisors doesn't work)

Edit:

Found one
 
Last edited:
Can someone help me with this? It's a Online-list for nicaws but I don't know how to configure the database

PHP:
<?php
/*
    Copyright (C) 2007-2008  Nicaw

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
include ("include.inc.php");
$ptitle="Online Players - $cfg[server_name]";
include ("header.inc.php");
?>
<div id="content">
<div class="top">Online Players</div>
<div class="mid">
<?php
$SQL = new SQL();
$SQL->myQuery('SELECT name, vocation, level FROM players WHERE online = 1 ORDER BY name ASC');
if ($SQL->failed()) 
	throw new Exception('<b>Are you using TFS server?</b><br/>SQL query failed:<br/>'.$SQL->getError());
$i = 0;
echo '<table><tr class="color0"><td style="width:150px"><b>Name</b></td><td style="width:150px"><b>Vocation</b></td><td style="width:60px"><b>Level</b></td></tr>';
while ($player = $SQL->fetch_array()){
	$i++;
	echo '<tr '.getStyle($i).'><td><a href="characters.php?player_name='.urlencode($player['name']).'">'.htmlspecialchars($player['name']).'</a></td><td>'.htmlspecialchars($cfg['vocations'][$player['vocation']]['name']).'</td><td>'.$player['level'].'</td></tr>'."\n";
}
?>
</table>
</div>
<div class="bot"></div>
</div>
<?php include ("footer.inc.php");?>
 
Back
Top