How to create a "live server monitor" (Whatever it is) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Other (
https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (
https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: How to create a "live server monitor" (Whatever it is) (
/showthread.php?tid=302379)
How to create a "live server monitor" (Whatever it is) -
NessaHD - 08.12.2011
I saw alot of websites with these server monitors, which was showing stuff about the server live. Then i was wondering how to create one. Anyone of you know? Please tell, if you do ofcourse.
Re: How to create a "live server monitor" (Whatever it is) - array13 - 08.12.2011
you need to learn php
and second:
http://docs.typefish.co.uk/samp/php/query/
Re: How to create a "live server monitor" (Whatever it is) -
Dripac - 08.12.2011
You need to code one
Look at
www.gametracker.rs
They coded it
Re: How to create a "live server monitor" (Whatever it is) -
ca2k - 08.12.2011
All you need is:
Code:
<?php
$aPlayers = $query->getDetailedPlayers();
if(!is_array($aPlayers) || count($aPlayers) == 0)
{
echo '<br /><i>None</i>';
}
else
{
?>
<table width="400">
<tr>
<td><b>Player ID</b></td>
<td><b>Nickname</b></td>
<td><b>Score</b></td>
<td><b>Ping</b></td>
</tr>
<?php
foreach($aPlayers as $sValue)
{
?>
<tr>
<td><?= $sValue['playerid'] ?></td>
<td><?= htmlentities($sValue['nickname']) ?></td>
<td><?= $sValue['score'] ?></td>
<td><?= $sValue['ping'] ?></td>
</tr>
<?php
}
echo '</table>';
}
}
?>
and
http://files.typefish.co.uk/sa-mp/SampQueryAPI.php
+
fsockopen() has to be enabled - contact your host and ask them to enable it.
Re: How to create a "live server monitor" (Whatever it is) -
NessaHD - 08.12.2011
THanks guys.
** LOCK **