Pastes:104478  Views:2147207 


   Visual Basic 6

more languages available...

Looking to freelance?

( bids)

( bids)

( bids)

( bids)

( bids)

Hire Freelancers & Find Freelance Jobs Online -

Ready to launch?

Hire Work

The #1 Resource for Small Business & Entrepreneurs

Hire freelancers for a fraction of the cost!

  • Post your project within seconds

  • Compare prices & select bidders

  • Pay only once satisfied

Looking for work?

Become a freelancer and earn money!

  • Browse jobs matching your skills

  • Apply for work

  • Get hired and earn money

Sign up with your email address
Looking to hire?

1. Describe your project

2. Set budget

  1. Budget type
  2. Hours of work required
  3. hours per Week
  4. previous step

3. Log in/Sign up

  1. I am a
  2. previous step
( bids)


3D Engine and Development SDK







Here's the requested code from the pastebin:

Wrap Lines   Use Line Numbers
//This php file is built to pull armory data from the World of Warcraft Amory site.
//Built by: Zxile - Drenden US
//Built mainly for Lhivera's Mage Theorycraft-o-Matic
//This document requires php 5, due to the use of the SimpleXML parser.
//Function: pull_stats
//Takes 3 variables
//name = Name of the character
//Server = Server the character is located on.  Note: This function automatically converts Server Names with spaces into url compatiable strings
//Region = US or EU
//false; if the character is not found
//Stats array; if character was present.
function pull_stats($name, $realm, $region='us') {
  //Decide between EU and US armory sites.
  if($region == 'eu') {
    $baseurl = '';
  else {
    $baseurl = '';
  //$server = str_replace(' ', '+', $server);//Replace spaces with +
   //ini_set('user_agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv: Gecko/20070725 Firefox/'); //Set User Agent to make armory page think we're calling from a browser, GG Blizzard
  ini_set('user_agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; rv: Gecko/20070725 Firefox/'); //Set User Agent to make armory page think we're calling from a browser, GG Blizzard
   $character_url = $baseurl . "character-sheet.xml?r=" . urlencode(stripslashes($realm)) . "&n=" . urlencode(stripslashes($name));
   $talents_url = $baseurl . "character-talents.xml?r=" . urlencode(stripslashes($realm)) . "&n=" . urlencode(stripslashes($name));
   echo "$character_url<br>";
  //$queryurl = $baseurl . 'character-sheet.xml?r=' . $server . '&n=' . $name; //Setup URL for Query
  //$queryurl2 = $baseurl . 'character-talents.xml?r=' . $server . '&n=' . $name; //Setup URL for Query
  //$xmldoc = simplexml_load_file($queryurl); //Pull Stat data from Armory
   $char = simplexml_load_file($character_url); 
  //$xmldoc2 = simplexml_load_file($queryurl2); 
   $talents = simplexml_load_file($talents_url); 
  if($char->characterInfo['errCode'] == 'noCharacter' ) {
      echo "Character not found.<br>";
    return false; //Character not found
  } else { //Parse Stats
    $stats = array(); //instantiate the array
    $chardata = $char->characterInfo->character;
    $stats['Race'] = (string) $chardata['race'];
    $stats['Class'] = (string) $chardata['class'];
      $stats['GuildName'] = (string) $chardata['guildName'];
    $statsdata = $char->characterInfo->characterTab; //Root of charcter data    
    //Base Stats
      $stats['GuildName'] = (string) $char->characterInfo->character['guildName'];
    $stats['Stamina'] = (string) $statsdata->baseStats->stamina['effective'];
    $stats['Intellect'] = (string) $statsdata->baseStats->intellect['effective'];
    $stats['Spirit'] = (string) $statsdata->baseStats->spirit['effective'];
    $stats['Strength'] = (string) $statsdata->baseStats->strength['effective'];
    $stats['Agility'] = (string) $statsdata->baseStats->agility['effective'];
    //Spell Stats (Dmg, Crit, Hit)
    $stats['Arcane Damage'] = (string) $statsdata->spell->bonusDamage->arcane['value'];
    $stats['Fire Damage'] = (string) $statsdata->spell->bonusDamage->fire['value'];
    $stats['Frost Damage'] = (string) $statsdata->spell->bonusDamage->frost['value'];
    $stats['Shadow Damage'] = (string) $statsdata->spell->bonusDamage->shadow['value'];
    $stats['Nature Damage'] = (string) $statsdata->spell->bonusDamage->nature['value'];
    $stats['Holy Damage'] = (string) $statsdata->spell->bonusDamage->holy['value'];
    $stats['Healing'] = (string) $statsdata->spell->bonusHealing['value'];
    $stats['Spell Hit Rating'] = (string) $statsdata->spell->hitRating['value'];
    $stats['Spell Crit Rating'] = (string) $statsdata->spell->critChance['rating'];
    //NOTE: Spell Haste is not yet supported in the WoW Armory
    //Pull Spec Information
    $specstring = (string) $talents->characterInfo->talentTab->talentTree['value'];
    $stats['Arcane Mind'] = substr($specstring, 14, 1);//Arcane Mind points
    $stats['Mind Mastery'] = substr($specstring, 21, 1);//Arcane Mind points
    $stats['Arcane Pts'] = (string) $statsdata->talentSpec['treeOne'];
    $stats['Fire Pts'] = (string) $statsdata->talentSpec['treeTwo'];
    $stats['Frost Pts'] = (string) $statsdata->talentSpec['treeThree'];
    $buffsdata = $char->characterInfo->characterTab->buffs;
    $buffs = array();
    $i = 0;
    while (1) {
      if ($buffsdata->spell[$i]) {
        $buffs[] = $buffsdata->spell[$i]['name'];
      } else {
    $stats['Buffs'] = $buffs;
    return $stats;
}//end Function pull_stats
Syntax Highlighting:  

Copyright 2007 -