I still can't get it to work
Im trying on W3Schools HTML TestBed But it still doesn't work, Im also trying in Dreamweaver but still isnt working.
Code:
<html>
<body>
<?php
printf '<table width="100">';
$server = "127.0.0.1";
$portl = "7777";
$portc = "7778";
$portm = "9014";
$timeout = "5";
if ($server and $port and $timeout) {
$login = @fsockopen("$server", $portl, $errno, $errstr, $timeout);
$char = @fsockopen("$server", $portc, $errno, $errstr, $timeout);
$map = @fsockopen("$server", $portm, $errno, $errstr, $timeout);
}
printf'<tr><td align="center"><strong>Server Status</strong></td></tr>';
if($login) { print'<tr><td>Login:</td><td><font color="#00FF00"><strong> Online</strong></font><br><br></td></tr>'; }
else { printf'<tr><td>Login:</td><td><font color="#FF0000"><strong> Offline</strong></font><br><br></td></tr>'; }
if($char) { printf'<tr><td>Game:</td><td><font color="#00FF00"><strong> Online</strong></font></td></tr>'; }
else { printf'<tr><td>Game:</td><td"><font color="#FF0000"><strong> Offline</strong></td></tr>'; }
if($map) { print'<tr><td>Game:</td><td><font color="#00FF00"><strong> Online</strong></font></td></tr>'; }
else { print'<tr><td>Game:</td><td"><font color="#FF0000"><strong> Offline</strong></td></tr>'; }
print'</table>';
?>
</body>
</html>