ZAG
09-03-2007, 07:59 PM
WoWClass is my second useful PHP class. It retrieves information from the new Armory part of the WoW site.
It has many functions to retrieve character data.
Heres a list of functions:
http://www.files.uk.to/uploads/21989list.txt
To initialise it you would use
<?php
include(PATH TO PHP FILE);
$wow = new WoWClass(COUNTRY, REALM, NAME);
?>
So it would be like this for example:
<?php
include('WoWClass.php');
$wow = new WoWClass('eu', 'Deathwing', 'Tyber');
?>
The country part is either eu or us
Then to use a function you would do something like this:
<?php
include('WoWClass.php');
$wow = new WoWClass('eu', 'Deathwing', 'Tyber');
echo $wow->charRace();
?>
That would output the race of your character (Human, Troll, etc.)
Another function is the charActive() function, it checks to see if the character is active so it can retrieve the data.
if($wow->charActive()){
//Do things
}else{
//Do things
}
Here is something I made using this:
http://www.thomas.uk.to/wow
(NOTE: Hunteer and Tyber are not my chars, I am just using them as an example)
If you want things added to WoWClass or if you do not understand post here please.
Download:
http://www.files.uk.to/uploads/11649WoWClass.zip
It has many functions to retrieve character data.
Heres a list of functions:
http://www.files.uk.to/uploads/21989list.txt
To initialise it you would use
<?php
include(PATH TO PHP FILE);
$wow = new WoWClass(COUNTRY, REALM, NAME);
?>
So it would be like this for example:
<?php
include('WoWClass.php');
$wow = new WoWClass('eu', 'Deathwing', 'Tyber');
?>
The country part is either eu or us
Then to use a function you would do something like this:
<?php
include('WoWClass.php');
$wow = new WoWClass('eu', 'Deathwing', 'Tyber');
echo $wow->charRace();
?>
That would output the race of your character (Human, Troll, etc.)
Another function is the charActive() function, it checks to see if the character is active so it can retrieve the data.
if($wow->charActive()){
//Do things
}else{
//Do things
}
Here is something I made using this:
http://www.thomas.uk.to/wow
(NOTE: Hunteer and Tyber are not my chars, I am just using them as an example)
If you want things added to WoWClass or if you do not understand post here please.
Download:
http://www.files.uk.to/uploads/11649WoWClass.zip