Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/nmp/public_html/support/functions.php on line 4
NoMorePasting.com
Pastes:104841  Views:2213100 

Languages:

   ASP
   C#
   C++
   HTML
   Java
   PHP
   VB.NET
   Visual Basic 6

more languages available...


Looking to freelance?

( bids)

( bids)

( bids)

( bids)

( bids)

Hire Freelancers & Find Freelance Jobs Online - Freelancer

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

or
Sign up with your email address Looking to hire?

Need work done?

Post your project and receive competitive bids from freelancers within minutes. Our reputation system will make it easy to find the perfect freelancer for your job. It's the simplest and safest way to get work done online!

How do you benefit?

  • You'll receive competitive bids from our talented freelancers within minutes
  • Keeping up-to-date is easy with our realtime chat, 24/7 support, time tracker, and mobile apps
  • Pay for work safely and securely. Only release payment when you are 100% satisfied with the work provided!

Try Freelancer Local

  • Post a job

  • Pick the best

  • Get offers

 

 

 

 

 

 


Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/nmp/public_html/support/geshi/geshi.php on line 2072
Here's the requested code from the pastebin:

Wrap Lines   Use Line Numbers
<?php 
//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
//----------------------------
//Returns
//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 = 'http://eu.wowarmory.com/';
  }
  else {
    $baseurl = 'http://www.wowarmory.com/';
  }
 
  //$server = str_replace(' ', '+', $server);//Replace spaces with +
 
   //ini_set('user_agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6'); //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:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6'); //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;
    //Race
    $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'];
        $i++;
      } else {
        break;
      }
    }
    $stats['Buffs'] = $buffs;
 
    return $stats;
  }
}//end Function pull_stats
?>
Syntax Highlighting:  



Copyright 2007 - NoMorePasting.com