Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Feature Requests

Development::Feature Requests Post suggestions/feature requests here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 12-20-2007, 10:17 AM
narcberry
Sarnak
 
Join Date: Mar 2005
Location: Idaho, USA
Posts: 94
Default

The op link is borked so I dunno what all the stats were that seem important to most of you. To me, I built a small php page that queries some data from the database to display on a webpage.

http://www.jocoberry.com/eq/

As you can see, it's not a popular server. The problem with this method is you can only get info from what is in the database.

Here is the source php I use on that page:


To tell if the server is up or down:
PHP Code:
<?
if (exec("ps -A | grep world") == "")
   echo 
"<img src=\"./down.jpg\"</img>";
else
   echo 
"<img src=\"./up.jpg\"</img>";
fi
?>
Who is online:
PHP Code:
<?php
   
echo exec("mysql -H -u **USER** --password=**PASS** -D eqemu -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;\"");
?>
Number of accounts (most of these are the folks using that quick connect button):
PHP Code:
<?php
echo exec("mysql -H -u **USER** --password=**PASS** -D eqemu -e \"select count(id) as Accounts from account;\"");
?>
Trophy room by resale value:
PHP Code:
<?php
   
echo exec("mysql -H -u **USER** --password=**PASS** -D eqemu -e \"SELECT character_.name AS Name, items.name AS Item FROM character_, inventory, items WHERE account_id != 6  AND itemid = items.id AND charid = character_.id ORDER BY price DESC LIMIT 5;\"");
?>
Hope this helps.

Last edited by narcberry; 12-20-2007 at 06:22 PM..
Reply With Quote
 


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:07 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