53x11.com



WoW Server Status, 4.1

Thursday, April 21st, 2005 @ 6:18 AM - code

» Download WoW Server Status, 4.1 (.zip 173kb)

Latest Version Released on December 24th, 2012

Licensed under BSD, Copyright © 2014

Realm Status Badge

This lightweight PHP script will parse Blizzard's XML feed and display realm status on your Guild's web page. The output can be configured as text/HTML, a dynamically generated image or as a PHP array.

During peak hours, Blizzard's website connection is often unreliable. This script solves that problem by caching the XML data and only checking for updates at definable intervals.

The latest version supports both US and European servers (except Russia, sorry comrades).

This script requires PHP 4.3 or greater and the PHP GD Library installed on your server (very common library).

  1. To test if your server meets the requirements, upload the file server_test.php to any directory and run it from your browser. The script will let you know if your server is properly configured.

  2. There are a few variables you can set from within the script. The majority of these variables can also be changed on the fly via $_GET or function calls. If you are changing any variables within the script, make sure to remain within the quotes.

    I won't explain all of the variables, just a few noteworthy ones.

  3. Realm Status Badge, Half

    $display controls what the script outputs. full will display the larger badge, half will display the mini-badge, text will output plain text and none will return an array of the data within PHP.

  4. $image_type dictates the type of image the script will output, png (default) or gif. Some older browsers do not support pngs.

  5. Upload wow_ss.php and the wowss folder to your website. They don't need to be in the same directory.

  6. The script can be executed in several ways. The simplest method is to call the script as an image from within any type of HTML page. Use the following code:

    <img alt="WoW Realm Status" src="wow_ss.php" />
    

    Using this method, you can control the various aspects of the script using $_GET without changing having change the hard-coded variables. $realm, $display (full | half), $region (us | eu), $update_timer (in minutes), $data_path and $img_type (png | gif).

    For example, to output a mini-badge for the Ner'zhul server:

    Or to output the status for the European Ragnaros server, updating every 5 minutes in gif format:

  7. To include the script from within a PHP file, use the include_once(); and wow_ss(); to invoke the function. The wow_ss(); function takes the same variables as listed above. Within PHP, the $display can also ouput (text | none).

    <?php
    
        include_once('wow_ss.php');
        wow_ss('Azgalor');
    
    ?>
    

    Once you include the script, you can invoke the wow_ss(); as many times as you like. For example, to output the status of Medivh in text format:

    wow_ss('Medivh','text');
    

    To output the status of the European Blackrock server, updating every 15 minutes in png format:

    wow_ss('Blackrock',0,'eu',15,0,'png');
    
  8. Calling this script within a CMS (content management system) that has HTML blocks or modules should be simple. Just use the img code (demonstrated previously) as the block/module content. Every CMS system is different, but here is an example of a PHP-Nuke block.

    <?php
    
    if (eregi("block-wow_ss.php",$PHP_SELF)) { 
        header("Location: index.php");  
        die(); 
    }
    
    $content = '<div style="display: block; text-align: center; padding: 10px;">
    <img alt="WoW Realm Status" src="wow_ss.php?realm=Azgalor" />
    </div>';
    
    ?>
    

Article was last edited on Thursday, March 25th, 2010 @ 8:43 AM

Commenting has been disabled for this article. No futher comments may be added.

Version History

4.1 (08/08/14) - Changed the default Euro XML feed URL

4.0 (08/07/31) - Complete script rewrite, added function calls, Euro XML support. Error handling and header detection. Added GIF support

3.4 (06/04/10) - Small XML Change

3.3 (06/01/18) - Blizzard XML Supported - European servers not supported with version 3.3

3.2 (05/06/18) - German and French server status

3.1 (05/04/20) - Added (english) European server support

3.0 (05/04/20) - Added GD image library functions to generate an image based on server status, added caching to speed up script access, slightly improved error handling.

2.1 (05/04/18) - Fixed glaring PHP exit error

2.0 (05/04/18) - Rewrote most of the parser to accommodate Blizzard's changes, added error handling

2.2 (05/04/18) - Bah, Blizzard changes their HTML again, tiny fix

1.0 (04/12/08) - HTML Parser

Comments

Shak says
Monday, June 20th, 2005 @ 11:50 PM

Thanks mate, you did a great job !!!!

M3m0r3xXx says
Monday, July 11th, 2005 @ 11:21 PM

Cool

Chaz says
Tuesday, July 19th, 2005 @ 7:59 AM

Great script, Finally got this working well in a PHP-Nuke block, if anyone needs info on this feel free to shot me a message.

Tarik Bilgin says
Wednesday, September 14th, 2005 @ 2:24 PM

Many thanks for this wonderfully useful little script :) Just what I needed, and I stumbled across it while browsing the rest of your site!

Schlusenbach says
Tuesday, August 12th, 2008 @ 9:08 AM

Great job!!! I'm so glad you updated the skript! Thank you so much!

Druas The Elder says
Saturday, September 13th, 2008 @ 8:13 PM

Thanks for updating the script! It works great, all the problems I have had and have are due to my own ignorance.

  • Druas the Elder Governor of Feralas
James883 says
Sunday, October 19th, 2008 @ 7:09 PM

Hey great script. However, i am unable to get the status of the Europeian Server "Al'Akir".

Could someone help me out?

RD_2844 says
Tuesday, October 21st, 2008 @ 4:09 PM

Alright great add-on; to bad I can't get it to work :( Server_test.php worked fine, but the server status is (?) and nays 'no status source'. No idea what to do anymore. US servers, if able to give any advice it's be nice.

Rene says
Friday, October 31st, 2008 @ 10:02 AM
  1. Create new panel in Panel Management

  2. incert in panel.

    openside("insert servername"); ?> " //location of wow_server_status folder

Rene says
Friday, October 31st, 2008 @ 10:05 AM

-> James883 iside wow_ss.php you need to change the url for the EU server ex. ## $wowss['xml_url']='http://www.wow-europe.com/realmstatus/status.xml';

Rene says
Friday, October 31st, 2008 @ 11:56 AM

openside("Can I play ?"); ?>

OUberLord says
Sunday, November 9th, 2008 @ 11:04 PM

Mine has been broken for some time now, and always displayed "No Status Source...". I've went over every variable with a fine tooth comb, and the server test was successful. Any ideas?

BANDITS says
Saturday, November 22nd, 2008 @ 3:19 PM

i am unable to get the status of the US Server "Mug'thol".

Could someone help me out?

Kitsune says
Tuesday, December 23rd, 2008 @ 6:41 PM

I've made sure I have all the components necessary for this script to run, in addition to that, I ran the test script to be certain and it said that this script should be able to run on my page, however, whenever I implement the script onto the page I want it to show up on, I continue to get this "No Status Source" error, I'm not sure what I'm doing wrong, the instructions to implement this are a bit vague, I followed them to the letter, and still it's not working.

Brasserie says
Wednesday, December 24th, 2008 @ 1:50 AM

I'm also getting the same message, "No Status Source" I'm on EU - Ghostlands realm. Maybe another set of eye can spot a flaw i have overlooked. Here is a brake down of what my wow_ss.php looks like.

$wowss['realm'] = 'Ghostlands';

$wowss['display'] = 'full';

$wowss['region'] = 'eu';

$wowss['update_timer'] = '5';

$wowss['data_path'] = 'wowss';

$wowss['xml_url'] = 'http://www.wow-europe.com/realmstatus/index.xml';

Rest is default.

Regards, Brasserie

Brasserie says
Friday, January 30th, 2009 @ 11:06 PM

I asked my hosting company to take a look at the script for me and they found out what the problem was.

The path i entered for the $wowss['data_path'] =

Was incorrect. My new path is the following:

'/home/endlessf/public_html/wowss';

I hope this helps everyone out.

Regards, Brasserie

Front says
Friday, June 19th, 2009 @ 11:23 AM

Hello there, i think i have found a bug. All Server there have ' in the Servername donst work's! I cant fix them whit: $wowss['realm'] = ("Gul'dan"); i have set: $wowss['xml_url'] = 'http://www.wow-europe.com/realmstatus/index.xml'; $wowss['eu_xml'] = 'http://www.wow-europe.com/realmstatus/index.xml'; an this: $wowss['display'] = "full"; $wowss['region'] = "eu"; $wowss['update_timer'] = "1"; $wowss['data_path'] = "wowss"; $wowss['image_type'] = "gif";

someone can help me pls?

SomethingWrong says
Monday, August 10th, 2009 @ 4:48 AM

Yes on EU servers for all the names with a "'" the informations are not retrieve properly.

Tig says
Monday, August 10th, 2009 @ 1:52 PM

The fix for the servers with a ' character in their name is simple, just add the following at line 60 $wowss['realm'] = str_replace("'","'",$wowss['realm']);

This replaces the ' character for the encoded version. That said, I suppose the best way would be to properly encode the server name but I was debugging the problem and the fix works, I'm lazy and I'm fairly confident a more elegant solution will be implemented if the author wishes to add it..

Wonderful script, thank you.

BJD says
Monday, August 10th, 2009 @ 10:55 PM

Can't get this script to work. My website is using Joomla version 1.5 and a friend is providing the host service. Server_test.php worked fine, but the server status is (?) . US servers, if able to give any advice it's be nice. Trying to get the status for Norgannon.

SomethingWrong says
Tuesday, August 11th, 2009 @ 10:00 AM

Tig, your fix is not working for me unfortunatly. Can you upload somewhere your script please. Maybe the caracteres in my .php file are not encode correctly.

SomethingWrong says
Thursday, August 20th, 2009 @ 6:34 PM

Found it !

Just add the following at line 60 : $wowss['realm'] = str_replace("'","'",$wowss['realm']);

SomethingWrong says
Thursday, August 20th, 2009 @ 6:35 PM

$wowss['realm'] = str_replace("'","& # 0 3 9;",$wowss['realm']);

& # 0 3 9; with no space

Cletus says
Friday, September 11th, 2009 @ 10:03 AM

Nice script but i cant get it to work on EU Doomhammer. Got this error:

Doomhammer Unable to access remote XML file. Unable to access XML file.

Can someone help?

Ilixa says
Thursday, September 17th, 2009 @ 12:38 PM

SomethingWrong is right, it's works now perfectly with my server name (Vol'jin)

Xavathras says
Friday, September 25th, 2009 @ 12:16 PM

I am also getting the Unable to access remote XML file. Unable to access XML file error message.

Please help.

P3tekr says
Thursday, October 8th, 2009 @ 4:48 PM

I'm getting an error every time I try to display an image be it 'gif' or 'png'. If I set the display to text, everything works fine with no errors and the text displays my current realm's status. But when I set the display to full or half, i gives the the error: The image "http://sitename/guild/index.php&quot; cannot be displayed, because it contains errors.

I'm using to embed it into my site. All of the settings are changed within the wow_ss.php file.

Like I said before, everything seems to be working fine, it's getting the realm data, but just having trouble displaying the images for it. Do anyone have any ideas on what's going on?

P3tekr says
Thursday, October 8th, 2009 @ 4:50 PM

**I'm using the php include script to embed it into my site.

Mario says
Thursday, October 29th, 2009 @ 6:30 AM

Hi, In my web site it works with the region EU, but if the servant has one ' already it does not work, for example with EU's server Ghostland it works, with Shen'dralar not. Someone has some idea

Mario says
Thursday, October 29th, 2009 @ 6:47 AM

I itself answer myself. It is necessary to change Shen'dralar's name into Shen& # 0 3 9;dralar and works well. Without spaces

Robert says
Friday, January 1st, 2010 @ 7:51 AM

I cannot get the script to work.

It only shows the website name I entered: http://www.windforcer.de/wow-serverstatus/wow_ss.php

My complete root path would be: /var/www/vhosts/windforcer.de/httpdocs/wow-serverstatus/wowss

The path with the FTP user would be: /httpdocs/wow-serverstatus/wowss

But it doesn't work with one of them. What can I do?