<?php define('IN_PHPBB', true); $phpbb_root_path = defined('PHPBB_ROOT_PATH') ? PHPBB_ROOT_PATH : './../../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include $phpbb_root_path . 'common.' . $phpEx; include $phpbb_root_path . 'guild/includes/constants.' . $phpEx; include $phpbb_root_path . 'guild/includes/functions.' . $phpEx; include $phpbb_root_path . 'guild/includes/wowarmoryapi.' . $phpEx; $armory = new BattlenetArmory($GuildRegion, $GuildRealm); // $armory->setGuildsCacheTTL(1); $armory->setLocale($armoryLocale); // $armory->debug('emblem', true); $guild = $armory->getGuild($GuildName); $guildData = $guild->getData(); // echo "<pre>"; // print_r($guildData); // echo "</pre>"; if (!is_array($guildData)) { trigger_error("No guild array, armory not reachable", E_USER_ERROR); exit; } $guild->showEmblem(false, 215); $guild->saveEmblem($phpbb_root_path . 'guild/' . $GuildRegion . '_' . $GuildRealm . '_' . $GuildName . '.png');
<?php include 'config.php'; $armory = new BattlenetArmory(WOW_REGION, GUILD_SERVER); // Enable this is if toons with special characters break the API. // $armory->UTF8(TRUE); $armory->setLocale(WOW_LOCALE); // Exclude everything except progression $armory->characterExcludeFields(array('titles', 'stats', 'talents', 'items', 'reputation', 'professions', 'appearance', 'mounts', 'achievements', 'pvp', 'quests', 'pets', 'guild', 'petSlots', 'audit', 'feed', 'hunterPets')); $guild = $armory->getGuild(GUILD_NAME); $members = $guild->getMembers('rank', 'asc'); //Query the armory to get progression data from a number of characters. function getRawProgress($armory, $members) { $progress = array(); $count = 0; foreach ($members as $id => $char) { if ($char['character']['level'] < MAX_LEVEL) { unset($members[$id]); } else { if ($count < CHARACTERS_TO_CHECK) { //$info[] = $char['character']['name']; $progress[] = $armory->getCharacter($char['character']['name'], GUILD_SERVER); $count++; } } } return $progress; } //Set the boss kill counts in the main boss array function setKillCounts($progress, $bosses)