Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
On my web page i have a php script that reports information from my Ghost Recon Gaming Server to the web site and displays it. You can see it at http://christiangamers.net/forum/portal.php mid way down on the left.
If the Game server is off line. The web page is messed up with the error from not being able to get the data. Can I do something with the script to make it just not report date when the Gaming server is off line?Code: Select all
<?php
include ("http://24.131.47.214:26/Status/PHPInclude.txt");
?>
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#4A473F" id="AutoNumber2" style="border-collapse: collapse">
<tr>
<td width="80" class="style6">Active Mods</span></td>
<td width="131" class="style6">
<?php
foreach ($mods as $i => $value)
{
echo ($mods[$i])."<br>";
}
?>
</span></td>
</tr>
<tr>
<td width="80" class="style6">Map</span></td>
<td width="131" class="style6"><?php echo $map; ?></span></td>
</tr>
<tr>
<td width="80" class="style6">Mission</span></td>
<td width="131" class="style6"><?php echo $mission; ?></span></td>
</tr>
<tr>
<td width="80" class="style6">Game Type</span></td>
<td width="131" class="style6"><?php echo $gameType; ?></span></td>
</tr>
<tr>
<td width="80" class="style6">Game Length</span></td>
<td width="131" class="style6"><?php echo ((int) $gameLength/60).":".sprintf('%02d',($gameLength - ((int) $gameLength/60)*60)); ?></span></td>
</tr>
<tr>
<td width="80" class="style6">Remaining</span></td>
<td width="131" class="style6"><?php echo ((int) $remaining/60).":";
echo sprintf('%02d', ($remaining - ((int) $remaining/60)*60)); ?></span></td>
</tr>
<tr>
<td width="80" class="style6">Players</span></td>
<td width="131" class="style6">
<?php
foreach ($players as $i => $value)
{
echo ($players[$i])."<br>";
}
?>
</span></td>
</tr>
</table>feyd | Help us, help you. Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]