I just got done editing up a fabulous script for seeing if game servers are online and offline. What I am looking to do is make the actual Servers link to their forums.
The problem I am having is that I need to make Beta 1, Beta 2, and (Team) PvP link to their adjacent forums and I cant figure out how to put in the link in the code.
HERE is the website.
Here is the code...
[code=php]<?php
/
+------------------------------------------------------------------------------+
CPANEL STATUS SCRIPT
+------------------------------------------------------------------------------+
Copyright Notice(s)
+------------------------------------------------------------------------------+
Disclaimer Notice(s)
ex: This code is freely given to you and given "AS IS", SO if it damages
your computer, formats your HDs, or burns your house I am not the one to
blame.
Moreover, don't forget to include my copyright notices and name.
+------------------------------------------------------------------------------+
Author(s): Crooty.co.uk (Adam C)
+------------------------------------------------------------------------------+
*/
$data .= "
<style>
td,body
{
font-family: Arial, Helvetica, sans-serif;
font-size: 8pt;
color: #3896CC;
font-weight: bold;
text-align: center;
}
</style>
<br>
<center>
<div style=\"border-bottom:1px #999999 solid;width:311;\"><b>
<font size='1' color='#3896CC'></font></b>
</div>
</center>
<br>";
//configure script
$timeout = "1";
//set service checks
$port[1] = "10115"; $service[1] = "Beta 1"; $ip[1] ="udp://sdkvgo-04-05.vgo.soe.sony.com";
$port[2] = "10114"; $service[2] = "Beta 2"; $ip[2] ="udp://sdkvgo-02-13.vgo.soe.sony.com";
$port[3] = "10114"; $service[3] = "(Team) PvP"; $ip[3] ="udp://sdkvgo-10-13.vgo.soe.sony.com";
//
// NO NEED TO EDIT BEYOND HERE
// UNLESS YOU WISH TO CHANGE STYLE OF RESULTS
//
//count arrays
$ports = count($port);
$ports = $ports + 1;
$count = 1;
//beggin table for status
$data .= "<table width='311' border='1' cellspacing='0' cellpadding='3' style='border-collapse:collapse' bordercolor='#ffffff' align='center'>";
while($count < $ports){
if($ip[$count]==""){
$ip[$count] = "localhost";
}
$fp = @fsockopen("$ip[$count]", $port[$count], $errno, $errstr, $timeout);
if (!$fp) {
$data .= "<tr><td bgcolor='#263039'>$service[$count]</td><td bgcolor='#FFC6C6'><b>Offline</b> </td></tr>";
} else {
$data .= "<tr><td bgcolor='#263039'>$service[$count]</td><td bgcolor='#D9FFB3'><b>Online</b></td></tr>";
fclose($fp);
}
$count++;
}
//close table
$data .= "</table>";
echo $data;
?> [/code]