Help

WoW Realm Status

Miscellaneous Login to Add Favorites
  • 0 Likes
  • World of Warcraft
  • 3,014 Downloads
  • Supports: 4.0.3a
  • 0 Average Daily Downloads
  • Comments
  • Created 11/7/2008 1:53:14 AM
  • Updated 12/6/2010 8:55:51 PM
  • 8 Favorites
  • Project Site
  • License: Written or Edited by Eric Gingell
  • Release Type: Release
  • Newest File: v201012061954
or
Support development! **
Donate

About WoW Realm Status

Description

Add your realm status to your PHP enabled website.

Having Issues or have a Suggestion?

  • Please don't use the comments to post trouble tickets or suggestions. Instead post a ticket on CurseForge. Thanks.
    • Any comments containing bug reports or feature requests will be deleted on sight and any comments asking where or why (referring to said comments) will also be deleted on sight.

Notice

  • Click here to see all realms on black background. Choose one from the drop-down to pin it to the top of the list. Included in the ZIP as realmstatus.php
  • Click here to see Blade's Edge on white background (used to debug single quotes). Included in the ZIP as rs_debug.php

Disclaimer

  • This is not an actual addon, it's a PHP script that is executed by a web server.

Instructions

  • Requires a webserver running PHP.
  • Upload the files to a web accessable directory, then point your browser to:
http://{your domain}/{path to files}/realmstatus.php

In-File Comments

   <array|string> wow_realm_status( [<string|boolean|null> server], [<string> return_string] )

   @optional <string|boolean|null> server: The server to check the status of.
       Default: Check all servers.
   @optional <string> return_string: If supplied, a string based on the format will be returned.
       This parameter is ignored if no <string> server is supplied.
       If server is passed <boolean> false or <null> null, the return array will contain strings based on the
           replacements below indexed by the server name.
       Replacements Table:
           %r => the server name.
           %s => the status of the server.
           %t => the type of server.
           %l => the population of the server.
       Default: Return an array.

   @return <array>: An array filled as such:
       If <string> server is a server name,
           [0] and ['s'] => Color coded status.
               Green "Up" if the server is online.
               Red "Down" if the server is offline.
           [1] and ['l'] => Color coded population.
               Green "Low".
               Aqua "Medium".
               Yellow "High".
               Red "Max (Queued)".
               Magenta "None" (only if the server is offline).
           [2] and ['t'] => Server type.
               Red "Normal".
               Red "PVP".
               Red "RP".
               Red "RPPVP".
       If <string> server is left out,
           [<zero-based numerical index>] and [<realm name>] =>
               [0] and ['s'] => Color coded status.
                   Green "Up" if the server is online.
                   Red "Down" if the server is offline.
               [1] and ['l'] => Color coded population.
                   Green "Low".
                   Aqua "Medium".
                   Yellow "High".
                   Red "Max (Queued)".
                   Magenta "None" (only if the server is offline).
               [2] and ['t'] => Server type.
                   Red "Normal".
                   Red "PVP".
                   Red "RP".
                   Red "RPPVP".
   @return <string>: A formatted string based on <string> return_string.

   Example Usage:
       // Check one server. Returns <array>
       $server = 'Your Server';
       list($stat, $pop, $type) = wow_realm_status($server);
       echo $server . '(' . $type . ') is ' . $stat . ($pop != 'None' ? ' with ' . $pop . ' population') . '.';

       // Check one server and format the string to your liking. Returns <string>
       $server = 'Your Server';
       $server_status = wow_realm_status($server, '%r (%t) is %s with %l population.');
       echo $server_status;

       // Check all servers. Returns <array> of <arrays>
       $realm_list = wow_realm_status();
       for ($i = 0; $status = $realm_list[$i]; $i++) {
           list($stat, $pop, $type) = $status;
           echo $server . '(' . $type . ') is ' . $stat . ($pop != 'None' ? ' with ' . $pop . ' population') . '.<br />' . "\n";
       }

       // Check all servers and format the string to your liking. Returns <array> of <strings>
       $realm_list = wow_realm_status(false, '%r (%t) is %s with %l population.<br />' . "\n");
       foreach ($realm_list AS $str) {
           echo $str;
       }

   Error Conditions:
       Cannot connect to the realm status page:
           Issue a PHP style warning and return to the calling script.
       Cannot find the supplied server on the realm status page:
           Issue a PHP style warning and return to the calling script. 

Donate

v201012061954
C - wow_realm_status.php

- Third time's the charm. Sorry, Curse approval team. :)

--------------------
C - wow_realm_status.php

- Fixed single server queries.

--------------------
v201012061914
C - wow_realm_status.php

- Updated for new Battle.net community site.

--------------------
v200912081745
C - wow_realm_status.php

- Now using PHP's XML parser instead of Regex to parse the realm status page.

--------------------
v200903050129
C - wow_realm_status.php
A - rs_debug.php

- Single Quote bug fix.

--------------------
v0.0.2
Re-Release

Comments

Learn how to disable ads
Learn how to disable ads
Login to Curse

Don't have an account? Create One.

Get an epic experience with Curse Premium
  • Faster Addon Downloads
  • Premium-Only Beta Giveaways
  • Ad-Free Curse.com Experience
  • Premium Curse Client
  • and many More Features
  • Learn More »

Minecraft 3D Print Giveaway

Enter Now!