View Single Post
Old 19.07.2009, 19:20   #6
balapro
Guest
 
Posts: n/a
Default [Request]Server Status Script

Sorry for the noober qustion, Iam lack of PHP knowledge, how to make it like this:

Server Status

Auth Server : online

Blabla Server : online

BloBlo Server : online

thank's in advance for any help.

easier

Make a php name config

<?php

//IP y puerto del servidor x30

$ip_login_low = "IP HERE";

$puerto_login_low = "2106";

$ip_game_low = "IP HERE";

$puerto_game_low = "7777";

//testeo de puerto del servidor x30

@$sock_login_low=fsockopen("$ip_login_low", $puerto_login_low, $errno, $errstr, 3);

if ($sock_login_low) { $status_login_low = "up"; }

else { $status_login_low = "down"; }

@$sock_game_low=fsockopen("$ip_game_low", $puerto_game_low, $errno, $errstr, 3);

if ($sock_game_low) { $status_game_low = "down"; }

else { $status_game_low = "up"; }

and now.. in your web...

<!-- Inicio Status -->

<td>

<span class="texto-lat"><br /><br />

Lineage II YOU SERVER

<br><br>

<?php

include './config.php';

?>

<table width="50%" border="0" cellpadding="0" cellspacing="0" align="center">

<tr>

<td><img class="imagen-banner" src="./images/status_<?=$status_login_low;?>.png"></td>

<td><span class="texto-lat">Login</span></td>

</tr>

<tr>

<td><img class="imagen-banner" src="./images/status_<?=$status_game_low;?>.png"></td>

<td><span class="texto-lat">Server x10</span></td>

</tr>

</table>

</span>

</tr>

<!-- Fin Status -->

Версия форума 2009–2010. Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Время показано по часам снимка; часовой пояс не установлен. Дата в снимке: 07-19-2009, 07:20 PM. Открыть источник.