<?php
include 'class.CoDStats.php';
$console = "xbox"; //a console, either ps3 or xbox
$player_id = "2533274791915247"; //the users id you can find out how to find this at cod5.classicwars.com
$stats = new CoDStats($console, $player_id);
echo $stats->__get("xp"); //using the __get() function to fetch the xp data reffer to the class to find a list of data you can fetch
echo $stats->__get("kills"); //fetches total ammount of kills a player has had
echo $stats->_list_accepted_attributes(); //displays a list of all the accepted attributes for the __get() functions
$data = $stats->_get_data_array(); //puts all the data into an array of $data[]
echo "<pre>";
print_r($data); //showing the structure of the $data array
echo "</pre>";
if($stats->errors === true){
die("Errors found unable to parse XML"); //manual error check
}else{
echo "Parsed all XML!";
}
?>
|