Hey just wondering if anyone had a realm status script handy that doesn't require the stats.xml file, great help if you do
Hey just wondering if anyone had a realm status script handy that doesn't require the stats.xml file, great help if you do
$ch = curl_init();
$useragent="Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11";
curl_setopt ($ch, CURLOPT_URL, "http://www.worldofwarcraft.com/realmstatus/status.xml");
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$source = curl_exec($ch);
curl_close($ch);
$xml = new SimpleXMLElement($source);
foreach ($xml->r as $server){
echo $server['n'] . " - ";
if ($server['s'] == "1") {
echo "<font color=green><b>Online</b></font>";
} else {
echo "<font color=red><b>Offline</b></font>";
}
echo "<br>";
}
Coded by me about a month or 2 ago, requires cUrl installed on the server. Not sure if it still works
About officials, well the realm status page is just bullshit.. talking about the EU one. It is never up and working, just garbage just like their costumer support. Might sound outrageous but if I were able to get explosives from any Asian country I would buy it and plant some at Blizzards HQ in Paris -would feel extraordinary pleasant (revenge).
i can give ya some php that will see how many players are online and if the server is online
yeh that what i need insanesk8123 for ascent not mangos
(Credits go to PHP.net, even though I could of done this myself...) Here:
<?php
$fp = fsockopen("localhost", 80);
if (!$fp) {
echo "Down";
} else {
echo "Up";
fclose($fp);
}
?>
Last edited by Sonic Waffle; 08-20-2008 at 10:27 PM.
Alright, put in "127.0.0.1" the IP of the Server (External IP, I believe) and then the Port into the Port slot (8129 by default) and then it should update everytime she launches/shutdown ServerCode:<?php //Server Config = "127.0.0.1"; = 8129; if(realm_status(, ) === false) { echo "<font color=red>Offline</font>"; } elseif(realm_status(, ) === true) { echo "<font color=green>Online</font>"; } else { echo "<font color=yellow>Unavailable</font>"; } function realm_status(, ) { error_reporting(0); = fsockopen(,,,,3); if(!) { return false; } else { return true; } } ?>
Last edited by Blackboy0; 09-23-2008 at 08:29 PM.
cheers man +rep i couldnt get the other one to work
No problem mate My pleasure!
I tried using that one and when I went to the website, all that showed was..
Code://Server Config = "127.0.0.1"; = 8129; if(realm_status(, ) === false) { echo "Offline"; } elseif(realm_status(, ) === true) { echo "Online"; } else { echo "Unavailable"; } function realm_status(, ) { error_reporting(0); = fsockopen(,,,,3); if(!) { return false; } else { return true; } }
Alright, my Post is updated with the PHP Tags