Donations Welcome :: You are using a code source that is available nowhere else on the web. Even though the source is encoded, feel free to take a crack at the class yourself and see how long it takes you!

Anything helps!
Donation Paypal ::
maskedcrusaderdotcom@gmail.com
----------------------------------------------------------------------------------
Installation Step 1
After downloading the PHP class from this forum, you will need to ensure that your server has something called the Ioncube Loader installed and enabled. As this file is encrypted to keep from reverse engineering and theft, this is the only way I could ensure that the source code stays in my hands.
There is a package on the Downloads thread for the Ioncube Loader. Instructions on how to install it on your web server can be found in the Readme file in the package. If you are unable to get it installed properly, please make a post in this forum so that someone can help you troubleshoot or contact your host for assistance.
Step 2
If you have reached Step 2, that is because you have Ioncube Loader installed and working properly.
At this point, go ahead and upload the
gearScore.class.php to the location on your server where you think it will be best served (recommend the
include(s) directory as this is an inclusion file and it is good file structure practice).
Once you have uploaded
gearscore.class.php, find and open the file which will call it.
Here is an example of what my
index.php file looks like for this call:
Code:
include('includes/gearScore.class.php');
$gearscore = new gearScore();
Step 3
This is where things get a bit tricky. In order for this class file to work properly, you are going to need to pass WoW Armory data to the class file.
If you are not familiar with how to pull WoW Armory data, then I would advise to go do a Google search and figure that out beforehand.
I am using the following armory code ::
http://pwneo.googlecode.com/svn/trun...mory.class.php. Mine is more modified, but this will at least get you off the ground.
HUGE NOTE: In the phpArmory.class.php file, find the function called "itemFetch".
Change:
PHP Code:
$url = $this->armory."item-tooltip.xml?i=".$itemID;
To:
PHP Code:
$url = $this->armory."item-info.xml?i=".$itemID;
Once you have figured out how to get the character's class and item list, it is time to pass it all to the
gearScore.class.php.
Here is an example of my code:
Code:
//This foreach statement exists because we need to check to see
//whether the items in slot 15 and 16 are two-handed weapons. The
//"itemFetch" function in the phpArmory.class.php allows us to see whether
//the item is two-handed or not. We need to know this as the multipliers
//are dependent on this.
foreach($characterData['characterinfo']['charactertab']['items']['item'] as $item){
if($item['slot'] == 15 || $item['slot'] == 16)
$item_infos[] = $armory->itemFetch($item['id']);
}
include('includes/gearScore.class.php');
$gearscore = new gearScore();
//The getScore function requires you to pass the class name, all of the
//items for the character (can be done via the phpArmory.class.php) and
//then the item information for slot 15 and 16 (so that we know whether
//those items are two-handed or not).
$actual_gs = $gearscore->getScore($charDetails['class'], $characterData['characterinfo']['charactertab']['items']['item'],
$item_infos);
The
$actual_gs variable will contain the final calculated Gearscore. Once you have this, you can insert into your database, display it, etc.
All of this example code is free for you to use.