I set up a small testfile in PHP that gets data from the new WoW Armory API via CURL.
The result is delivered in JSON and then converted into a PHP array.

<?php
//function and variables
function json_code($json) {
return json_decode($json, true);
}
//html output
function p($output) {
$eol = "\n";
echo $output.$eol;
}
//html header stuff
header('Content-Type: text/html; charset=utf-8');
//html output
p('<html>');
p('<head>');
p(' <title>WoW Armory API: Realm Status Test</title>');
p('</head>');
p('<body>');
p(' <h1><a href="test1.php">WoW Armory API: Realm Status Test</a></h1>');
//url to ask for
$url = 'http://us.battle.net/api/wow/realm/status?realm=Medivh&realm=Blackrock';
//curl init
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$json = curl_exec($ch);
curl_close ($ch);
$json_orig = $json; //temp
//$json = utf8_encode($json); //in case utf8 encoding is needed
$arrayed_json = json_code($json); //generate php array from json response
//Output
p(' <h3>Output</h3>');
//print the json code
print_r($json_orig);
p('');
p(' <hr>');
//print the php array
print_r($arrayed_json);
p('');
p(' <hr>');
//print result in loop
$realms = $arrayed_json['realms'];
for ($i=0;$i<count($realms);$i++) {
p(' <h3>Realm: '.$realms[$i]['name'].'</h3>');
p(' <p>Type: '.$realms[$i]['type'].'</p>');
p(' <p>Status: '.$realms[$i]['status'].'</p>');
p(' <hr>');
}
p('</body>');
p('</html>');
?>
Once the data is retrieved and converted into an PHP array it can be extracted easily.
Result of the code above:
<html>
<head>
<title>WoW Armory API: Realm Status Test</title>
</head>
<body>
<h1><a href="test1.php">WoW Armory API: Realm Status Test</a></h1>
<h3>Output</h3>
{
"realms":[
{
"type":"pvp",
"population":"high",
"queue":false,
"status":true,
"name":"Blackrock",
"slug":"blackrock"
},
{
"type":"pve",
"population":"medium",
"queue":false,
"status":true,
"name":"Medivh",
"slug":"medivh"
}
]
}
<hr>
Array
(
[realms] => Array
(
[0] => Array
(
[type] => pvp
[population] => high
[queue] =>
[status] => 1
[name] => Blackrock
[slug] => blackrock
)
[1] => Array
(
[type] => pve
[population] => medium
[queue] =>
[status] => 1
[name] => Medivh
[slug] => medivh
)
)
)
<hr>
<h3>Realm: Blackrock</h3>
<p>Type: pvp</p>
<p>Status: 1</p>
<hr>
<h3>Realm: Medivh</h3>
<p>Type: pve</p>
<p>Status: 1</p>
<hr>
</body>
</html>