Here is a PHP script you can use for every game to check it's online status, I build this in cause of many people are always curious if the server is online or offline.
Most likely the login and the game server itself got another port they use, so give in the right port at $port and $port2
Live test:
http://www.nortfor.com/ostatus/
Hopefully you like it:
PHP Code:
<?php
$serverip = "YOUR SERVER-IP HERE";
$serverip2 = "YOUR SERVER-IP HERE";
$port = "PORT OF SERVER";
$port2 = "PORT OF SERVER";
echo statuscheck($serverip, $port);
echo statuscheck2($serverip2, $port2);
function statuscheck($serverip, $port) {
$sockres = @fsockopen($serverip, $port, $errno, $errstr, 1);
if (!$sockres) {
return "
<tr>
<td>
<img src=indexoff_01.gif width=175 height=45 alt=IOffline><br></td></tr>";
} else {
@fclose($sockres);
return "<tr><td>
<img src=indexon_01.gif width=175 height=45 alt=IOnline><br></td></tr>";
}
}
function statuscheck2($serverip2, $port2) {
$sockres = @fsockopen($serverip2, $port2, $errno, $errstr, 1);
if (!$sockres) {
return "
<tr><td>
<img src=indexoff_02.gif width=175 height=45 alt=ROffline><br></td><tr>";
} else {
@fclose($sockres);
return "<tr><td>
<img src=indexon_02.gif width=175 height=45 alt=ROnline><br></td></tr>
";
}
}
?>
The images I used and the PHP file are attached into this post. This script is actually written for VBulletin to use with. If you want to use your own images it's possible. I just attached these if you'll need them.
if you dont get it to work, post your question here.
Please comment it.
Nortie