Beispiel #1
0
// For timing
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
// For timing
require_once 'diablo3.api.class.php';
// Settings
set_time_limit(0);
ini_set('memory_limit', '128M');
$Diablo3 = new Diablo3("XjSv#1677", 'us', 'en_US');
// Battle Tag (e.g. 'XjSv#1677' or 'XjSv-1677') (string), Server: 'us', 'eu', etc. (string), Locale: 'en_US', 'es_MX', etc. (string)
$CAREER_DATA = $Diablo3->getCareer();
$HERO_DATA = $Diablo3->getHero(3982160);
// Hero ID (int)
$ITEM_DATA = $Diablo3->getItem('item/COGHsoAIEgcIBBXIGEoRHYQRdRUdnWyzFB2qXu51MA04kwNAAFAKYJMD');
// Item Data 'item/COGHsoAIEgcIBBXIGEoRHYQRdRUdnWyzFB2qXu51MA04kwNAAFAKYJMD'  (string)
$FOLLOWER_DATA = $Diablo3->getFollower('templar');
// Options: 'enchantress', 'templar', 'scoundrel' (string)
$ARTISAN_DATA = $Diablo3->getArtisan('blacksmith');
// Options: 'blacksmith', 'jeweler' (string)
$ITEM_IMAGE = $Diablo3->getItemImage('unique_chest_013_104_demonhunter_male', 'large');
// Icon Name, Size: Options: 'small', 'large' (string)
$SKILL_IMAGE = $Diablo3->getSkillImage('barbarian_frenzy', '64');
// Icon Name, Size: Options: '21', '42', '64' (string)
$SKILL_TOOLTIP = $Diablo3->getSkillToolTip('skill/barbarian/frenzy', true);
// tooltipUrl, true for jsonp
$SKILL_RUNE_TOOLTIP = $Diablo3->getSkillToolTip('rune/frenzy/a', false);
// tooltipUrl, true for jsonp
$PAPERDOLL = $Diablo3->getPaperDoll('barbarian', 'female');
// Class, Gender
     // CREATE HERO ITEMS LIST
     //
     if ($full_insert || is_null($last_item_tooltip)) {
         $hero_items[$hero['id']][$key3] = $value3['tooltipParams'];
     } else {
         echo "Item record already exists, left out<br>";
     }
 }
 // GET HERO ITEMS
 //
 if ($hero_items > 0) {
     $ITEM_DATA = array();
     foreach ($hero_items as $hero_id => $items) {
         if (is_array($items)) {
             foreach ($items as $name => $tooltipParams) {
                 $ITEM_DATA[$hero_id][$name] = $Diablo3->getItem($tooltipParams);
                 // Item Data 'item/COGHsoAIEgcIBBXIGEoRHYQRdRUdnWyzFB2qXu51MA04kwNAAFAKYJMD'  (string)
                 $calls++;
             }
         }
     }
 }
 // INSERT HERO ITEMS
 //
 if (isset($ITEM_DATA[$hero['id']])) {
     foreach ($ITEM_DATA[$hero['id']] as $key4 => $value4) {
         if (is_array($value4)) {
             $value4['_itemType'] = $key4;
             $item_collection->insert($value4);
             $session_ids[] = $value4['_id'];
             echo "Hero Items Inserted<br>";