• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Offline / Online Status script


Im looking to add the following code to my template to display an application on an IP using a certain port if its Online or Offline.

$ts_ip = ""; // Change to your server's IP external or domain name
$ts_port = "7777"; // Make sure this port is open on the router or firewall

$output = @fsockopen("$ts_ip", $ts_port, $errno, $errstr, 2);
socket_set_timeout($output, 000002);

if (!$output) {
    echo "<FONT COLOR=#DD0000><B>Offline</B></FONT>";
} else {
    echo "<FONT COLOR=#00DD00><B>Online</B></FONT>";
Im new to the whole Xen forum, and need alittle help.