Yet a proposition: Would be gr8 if one may see the S1/S2/Demo mode of the host as well...
<?php
$lfs_ip = "localhost";
$lfs_port = "63392";
$output = @fsockopen("$lfs_ip", $lfs_port, $errno, $errstr, 0.01);
if (!$output) {
$status = "offline";
} else {
$status = "online";
}
@fclose($output);
// and then ...
if ($status == offline) {
echo "status: offline
} else {
// all the output from vorts script ...
}
<?php
$mode = shell_exec('grep mode /path/to/setup.cfg');
echo "mode: ";
echo substr("$mode", 6);
?>
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home/xxx/xxx/xxx/lfshosts/server.php on line 155
Status: offlineStatus: offlineStatus: offlineStatus: offlineStatus: offlineStatus: offlineStatus: offlineStatus: offlineStatus: offlineStatus: offlineStatus: offlineStatus: offlineStatus: offlineStatus: offlineStatus