Works fine on my iis but

So I have some code that works absolutely fine in iis code is as follows

<?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);
?>

However I have a paid host and when I use the code it’s always displaying offline? Yet on my iis it shows online, what am I missing???

Update they informed me
“Fatal error: Uncaught Error: Call to undefined function fsockopen()” so now I’m confused

So my issue appears to be socket_set_timeout($output, <–This 000002);
expects parameter 1 to be resource, bool given in

Sponsor our Newsletter | Privacy Policy | Terms of Service