$time = $time[1] + $time[0]; $start = $time; require_once '../class/diablo3.api.class.php'; require_once '../config/settings.php'; require_once '../include/functions.php'; set_time_limit(0); ini_set('memory_limit', '256M'); $Diablo3 = new Diablo3(BATTLENET_ACCOUNT, DEFAULT_SERVER, DEFAULT_LOCALE); $connection = new Mongo(); $db = $connection->selectDB(PROD_DB); $all_items = $db->command(array("distinct" => ITEM_COLLECTION, "key" => "icon")); $count = 0; // Download Small Images // foreach ($all_items['values'] as $item) { $count++; $Diablo3->getItemImage($item, 'small'); } // Download Large Images // foreach ($all_items['values'] as $item) { $count++; $Diablo3->getItemImage($item, 'large'); } $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $finish = $time; $total_time = round($finish - $start, 4); $total_time = secondsToTime($total_time); echo '<br>Proccess finished in ' . $total_time . ' seconds. ' . $count . " Images Saved<br>";
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 // 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;