Ok, so I used an old code I had saved from years ago which displays my orgs roster (you can check it out
here) using PHP and an XML parser.
Here is the php code,
Code:
<?php
require_once ('XML/Unserializer.php');
// URL of our web service
$url = "http://people.anarchy-online.com/org/stats/d/1/name/10749959/basicstats.xml";
// Initialize cURL
$ch = curl_init();
// Set cURL options
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// Execute cURL
$content = curl_exec($ch);
curl_close($ch);
// Create instance of XML_Unserializer
$Unserializer = &new XML_Unserializer();
$status = $Unserializer->unserialize($content);
if (PEAR::isError($status))
{
die($status->getMessage());
}
$data = $Unserializer->getUnserializedData();
echo '<table id="member_table" width="100%">';
echo '<tr class="head"><th>Rank</th><th>Name</th><th>Level</th><th>Profession</th></tr>';
$bgcolor = 1;
$rank_name = "";
foreach($data['members']['member'] as $member) {
if ($rank_name != $member['rank_name']){
$rank_name = $member['rank_name'];
if ($bgcolor == 1) {
$bgcolor = 2;
} else { $bgcolor = 1; }
}
echo '<tr class="bgcolor'.$bgcolor.'">';
echo '<td>'.$member['rank_name'].'</td>';
echo '<td>';
if ($member['firstname'] != "") echo $member['firstname'].' "';
echo $member['nickname'];
if ($member['lastname'] != "") echo '" '.$member['lastname'];
echo '</td>';
echo '<td>'.$member['level'].'</td>';
echo '<td>'.$member['profession'].'</td>';
echo '</tr>';
}
echo '</table>';
?>
The question is, how can I change/adapt the code so that my clan's statistics are displayed?
I'm no PHP or XML expert, actually had I not found the old code from a previous clan site, I probably would be asking for the whole process =P
Any help would be appreciated.