Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 05-12-2013, 12:47 PM
Zamthos
Discordant
 
Join Date: Jan 2013
Posts: 284
Default Server Status??

I have looked to find out how to call whether the server is online or offline, I have been successful in finding something that may do the trick, but it says the server is Offline even though it is online, and it still pulls the player information, code below.

Code:
<?php
if (exec("ps -A | grep world") == "")
   echo "<img src=\"./down.jpg\"</img>";
else
   echo "<img src=\"./up.jpg\"</img>";
fi
?>

<?php
   echo exec("mysql -H -u USER --password=PASSWORD-D DATABASE -e \"select distinct character_.name as Name, long_name as Zone from zone, character_, character_backup where zone.zoneidnumber = character_.zoneid and character_.name = character_backup.name AND ts > current_timestamp() - interval 1 hour ORDER BY ts;\"");
?>
EDIT: Could it be that it's checking for the world process and setting it as Down if it is there? This code is from an old 2007 post. http://www.eqemulator.org/forums/sho...+online+button
Reply With Quote
  #2  
Old 05-12-2013, 03:34 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,072
Default

Zamthos,

That snippet of code is only going to do you any good on a Linux system.

If you want to make a way to show the server is online, I suggest a way of either

A) Parsing the Server List Page on EQEmulator for your needs...
B) Telnetting into port 9000 (World Server) of your server and pulling the information that you want through the telnet console. This will require you to have PHP telnet client to do this or Perl CGI Telnet client. Perl's telnet client is superb but then you also have to figure out how to use CGI for web servers.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 08:59 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3