Code works fine using iis but my webhost has an issue with it code is as follows
The reason why it possibly won't work is "Fatal error: Uncaught Error: Call to undefined function fsockopen()"
Code:
<?php
$ts_ip = "External IP"; // Change to your server's IP external or domain name
$ts_port = "8000"; // 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=#FFFFFF>Shadowlands is </font><FONT COLOR=#DD0000><B>OFFLINE</B></FONT>";
} else {
echo "Shadowlands is <FONT COLOR=#00DD00><B>ONLINE</B></FONT>";
}
@fclose($output);
?>