Server Status PHP Script...

Website Scripts for your Helbreath Server.
Post Reply
Mastah
Regular
Posts: 30
Joined: Sun Feb 29, 2004 1:04 pm

Post by Mastah »

I downloaded the script from helbreathss.tk, and it looks like this:

Code: Select all

$fp = @fsockopen('Put your IP Here', Port Goes here. Usually 3002, $errno, $errstr, 2);
if($fp){ '<font color=green>Online</font>'; }
else{ echo '<font color=red>Offline</font>'; }
After puting in my IP it looks like this:

Code: Select all

$fp = @fsockopen('xx.xxx.xxx.xx', 3002, $errno, $errstr, 2);
if($fp){ '<font color=green>Online</font>'; }
else{ echo '<font color=red>Offline</font>'; }
But it doesnt work - shows "Offline" eaven if the server is ON. :(

Anyone knows why? Wrong port??? Wrong script???
Must i host the script of the same computer, that the server is on??

Note: I replaced my IP with xx.xxx.xxx.xx for security reasons. :P
locobans
Outpost Junkie
Posts: 2264
Joined: Tue Jul 13, 2004 3:51 am
Location: Behind You
Contact:

Post by locobans »

its easy, open your GateServer and look the ports it uses, if u tired not working, open the MainServer if not working look the ports of the Worldserver its kinda easy B)
QUOTE (ADDKiD @ Dec 1 2006, 4:01 PM) <br>You guys make me laugh alot, half the shit I say, is bullshit...<br><br><img src='http://img485.imageshack.us/img485/492/banssig1ng.gif' border='0' alt='user posted image' /><br><br><b>I see no changes at all, wake up in the morning and ask myself...<br>Is life worth living? Should I blast myself?</b><br><br><b><a href='http://2paclegacy.com' target='_blank'>2PacLegacy.com</a></b>
cocho
Loyal fan
Posts: 363
Joined: Sat Jan 24, 2004 10:33 pm
Location: Caracas - Venezuela
Contact:

Post by cocho »

just see in ur game server folders, in each gserver.cfg u will see
game-server-port = 8239
so this is the port, and just put ur ip :rolleyes:

i dont know if it works with scripts hoster in diff pc, but i host scripts in the same pc of the server files n it works perfect .
sorry for my english
Nemeliom
Loyal fan
Posts: 327
Joined: Sun Aug 01, 2004 10:20 pm
Contact:

Post by Nemeliom »

if you want it to work, you must download Easy-PHP 1.7, and put the script into the "www" folder. Then, just activate Easy-PHP and enter <a href='http://yourIP/ServerStatus.php' target='_blank'>http://yourIP/ServerStatus.php</a>
<img src='http://jove.prohosting.com/mxghost/Neme ... y%20Mx.jpg' border='0' alt='user posted image' /> <span style='color:blue'>Do you like mi pic?</span><br><span style='color:red'>Good Luck 4 every1<br>Mx - Nemeliom</span>
cocho
Loyal fan
Posts: 363
Joined: Sat Jan 24, 2004 10:33 pm
Location: Caracas - Venezuela
Contact:

Post by cocho »

if he said "But it doesnt work - shows "Offline" eaven if the server is ON." its cuz he has already the scripts online <_<
Nemeliom
Loyal fan
Posts: 327
Joined: Sun Aug 01, 2004 10:20 pm
Contact:

Post by Nemeliom »

lol... he should look at it b4 posting :D
<img src='http://jove.prohosting.com/mxghost/Neme ... y%20Mx.jpg' border='0' alt='user posted image' /> <span style='color:blue'>Do you like mi pic?</span><br><span style='color:red'>Good Luck 4 every1<br>Mx - Nemeliom</span>
Mastah
Regular
Posts: 30
Joined: Sun Feb 29, 2004 1:04 pm

Post by Mastah »

I played a little with the script, and it works now :)

BTW: some noob forgot to add "echo" before one line :P Should be like this:
$fp = @fsockopen('xx.xxx.xxx.xx', 8239, $errno, $errstr, 2);
if($fp){
  <span style='color:red'>echo</span> '<font color=green>Online</font>';
}
else{
  echo '<font color=red>Offline</font>';
}
cocho
Loyal fan
Posts: 363
Joined: Sat Jan 24, 2004 10:33 pm
Location: Caracas - Venezuela
Contact:

Post by cocho »

nice work :rolleyes: now u got ur script working, without our help :(
binarydata
DBfiller
Posts: 3816
Joined: Fri Oct 31, 2003 5:30 am
Location: San Diego CA, USA
Contact:

Post by binarydata »

<img src='http://img88.exs.cx/img88/2290/7666.jpg' border='0' alt='user posted image' />
Post Reply