foreach ($hero['skills']['active'] as $key => $value) {
        if (isset($value['skill']['icon']) && !empty($value['skill']['icon'])) {
            $skills[$value['skill']['icon']] = 1;
        }
    }
    foreach ($hero['skills']['passive'] as $key => $value) {
        if (isset($value['skill']['icon']) && !empty($value['skill']['icon'])) {
            $skills[$value['skill']['icon']] = 1;
        }
    }
}
// Download Size 21px x 21px Images
//
foreach ($skills as $key => $value) {
    $count++;
    $Diablo3->getSkillImage($key, '21');
}
// Download Size 42px x 42px Images
//
foreach ($skills as $key => $value) {
    $count++;
    $Diablo3->getSkillImage($key, '42');
}
// Download Size 64px x 64px Images
//
foreach ($skills as $key => $value) {
    $count++;
    $Diablo3->getSkillImage($key, '64');
}
$time = microtime();
$time = explode(' ', $time);
Beispiel #2
0
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
// Before handling the data check to make sure the return is an array
//
if (is_array($CAREER_DATA)) {
    print_r($CAREER_DATA);
} else {
    echo $CAREER_DATA;
    // Error message
}