PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Matthew Johnston   Call of Duty World at War Stat Fetcher   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example
Class: Call of Duty World at War Stat Fetcher
Extract statistics from Call of Duty files
Author: By
Last change: Added error checking example
Date: 15 years ago
Size: 902 bytes


Class file image Download
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

$stats = new CoDStats($console, $player_id);

$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>";

$stats->errors === true){
"Errors found unable to parse XML"); //manual error check
"Parsed all XML!";