Elitist Jerks
Register
Blogs
Forums


Go Back   Elitist Jerks » Public Discussion

Reply
 
LinkBack Thread Tools
Old 07/16/09, 9:23 AM   #76
Zimeron
Cookies!
 
Zimeron's Avatar
 
Finala
Night Elf Druid
 
No WoW Account
You can use wowhead or another database site to pull the information for the item level, you can also use wowhead's armory profiler. You may also want to cache the item level for items, as that is unlikely to change.

Limit your queries to 1 a second and that will solve a lot of your banning problems. From there it seems to vary depending on the time of day how many you can do an hour, but if you do get banned, most are 12-24 hours. Lately I have been getting a 30 second ban after only doing 10-15 queries, so you may need to do more frequent pauses.

United States Offline
Reply With Quote
Old 07/19/09, 1:54 PM   #77
talonos
Glass Joe
 
Draenei Shaman
 
Stormrage (EU)
ok i'm working on a script from an idea in this thread but i'm stuck on displaying stats right

from the character_sheet.xml i'm pulling

      <baseStats>
        <strength attack="242" base="121" block="6" effective="131"/>
        <agility armor="162" attack="-1" base="71" critHitPercent="3.89" effective="81"/>
        <stamina base="135" effective="1014" health="9960" petBonus="-1"/>
        <intellect base="141" critHitPercent="7.84" effective="939" mana="13805" petBonus="-1"/>
        <spirit base="145" effective="155" healthRegen="16" manaRegen="79"/>
        <armor base="15519" effective="15519" percent="50.47" petBonus="-1"/>
      </baseStats>
but becuase its not in the normal xml format with name"" block i cant display the stats right for each segment

i got a simple code working

    $basestats_array = array(); 
    foreach(
$basestats->children() as $basestat)
    {
echo
' STAT:'$basestat['effective'] .'<br/>';


but for the love of me i've tried alsorts including
!isset and a count++ within a multi line statement.

if anyone could help me i'd really appreciate it

Offline
Reply With Quote
Old 07/20/09, 8:55 AM   #78
Evanaescent
Glass Joe
 
Goblin Rogue
 
Thrall
Not sure what you're doing with the array, assuming that is something different that you're trying to store results locally or whatever. For specifically what you're trying to do, all you need is the following:


foreach ($xml->characterInfo->characterTab->baseStats->children() as $stats)
{
    echo 
$stats->getName()." : ".$stats['effective']."<br/>";


Offline
Reply With Quote
Old 07/21/09, 12:29 PM   #79
talonos
Glass Joe
 
Draenei Shaman
 
Stormrage (EU)
Evanaescent; thank you for your reply it works perfect.

For the people wondering what i'm working on its an armory page, It is still in the early in stages but heres what i have working upto now,

<!-- INCLUDE overall_header.html -->
<!-- PHP -->




if (isset($_GET['n']) && isset($_GET['r']) && isset($_GET['z']) )

    $search = true; 

else $search = false; 

if($search == true) 


    $BROWSER="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070319 Firefox/2.0.0.3";  

    $char_url = 'http://'.$_GET['z'].'.wowarmory.com/character-sheet.xml?r='.$_GET['r'].'&n='.$_GET['n']; 
     

    //init curl session for character sheet information 
    $ch = curl_init(); 

    //set curl to return data instead of printing to browser 


    curl_setopt ($ch, CURLOPT_URL, $char_url);  
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);  
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 15);  
    curl_setopt ($ch, CURLOPT_USERAGENT, $BROWSER); 


    //execute the fetch 
    $xml = curl_exec($ch); 
     
    //Close the curl connect 
    curl_close($ch); 

    $xml_obj = simplexml_load_string($xml); 

    //Set the character's info into variables. 
    $name = $xml_obj->characterInfo->character['name']; 
    $level = $xml_obj->characterInfo->character['level']; 
    $class = $xml_obj->characterInfo->character['class']; 
    $guild = $xml_obj->characterInfo->character['guildName']; 
    $lastonline = $xml_obj->characterInfo->character['lastModified'];
    $items = $xml_obj->characterInfo->characterTab->items; 
     $spec = $xml_obj->characterInfo->characterTab->talentSpecs;
     $professions = $xml_obj->characterInfo->characterTab->professions; 
 $charactorbars = $xml_obj->characterInfo->characterTab->characterBars; 
 $basestats = $xml_obj->characterInfo->characterTab->baseStats; 
$melee = $xml_obj->characterInfo->characterTab->melee;
$rang = $xml_obj->characterInfo->characterTab->ranged;
$healing = $xml_obj->characterInfo->characterTab->spell;
$spell = $xml_obj->characterInfo->characterTab->spell->bonusDamage; 

    //Array of item levels that will be searched for 
    $levelsOfInterest = array(187,200,213,219,226,232,239); 
     
    //Number of items below 187 
    $offGear = 0; 




    //init curl session for item information 
    $ch = curl_init(); 
     
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);  
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 5);  
    curl_setopt ($ch, CURLOPT_USERAGENT, $BROWSER); 
     
    $spec_array = array(); 
    foreach($spec->talentSpec as $sp)
    {
        if($sp['active'] == 1)  $active =' '.  $sp['prim'] .' - '. Active .' - '. $sp['treeOne'] .'/'. $sp['treeTwo'] .'/'. $sp['treeThree'] .' <br/>'; 
        if($sp['active'] == NULL)  $inactive =' '.  $sp['prim'] .' - '. Inactive .' - '. $sp['treeOne'] .'/'. $sp['treeTwo'] .'/'. $sp['treeThree'] .' <br/>'; 
}
    //Create the array containing the item levels of the character's gear.
    $item_array = array(); 
    foreach($items->item as $i) 
    {
        switch($i['slot'])
        {
            case '0':
                $slot='Head';
            break;
            case '1':
                $slot='Neck';
            break;
            case '2':
                $slot='Shoulder';
            break;
            case '3':
                $slot='Shirt';
            break;                
            case '4':
                $slot='Chest';
            break;
            case '5':
                $slot='Waist';
            break;
            case '6':
                $slot='Legs';
            break;
            case '7':
                $slot='Feet';
            break;    
            case '8':
                $slot='Wrist';
            break;    
            case '9':
                $slot='Hands';
            break;
                        case '10':
                $slot='Ring 1';
            break;
                        case '11':
                $slot='Ring 2';
            break;
            case '12':
                $slot='Trinket 1';
            break;
            case '13':
                $slot='Trinket 2';
            break;
            case '14':
                $slot='Cloak';
            break;
            case '15':
                $slot='Main Hand';
            break;
                        case '16':
                $slot='Off Hand';
            break;
                        case '17':
                $slot='Ranged';
            break;
                    case '18':
                $slot='Tabard';
            break;
            default: 
                $slot='none';
            break;                                                        
        }
        $item_url = 'http://eu.wowarmory.com/item-info.xml?i='.$i['id']; 
        curl_setopt ($ch, CURLOPT_URL, $item_url); 
        $xml_item = curl_exec($ch); 
        $xml_obj_item = simplexml_load_string($xml_item); 
         
        $itemLevel = $xml_obj_item->itemInfo->item['level'];


if ($i['slot'] == 0) {
$head = $i['id'];
$headlvl = $itemLevel;
$headimg = $i['icon'];
}
if ($i['slot'] == 1) {
$neck = $i['id'];
$necklvl = $itemLevel;
$neckimg = $i['icon'];
}
if ($i['slot'] == 2) {
$shoulder = $i['id'];
$shoulderlvl = $itemLevel;
$shoulderimg = $i['icon'];
}
if ($i['slot'] == 3) {
$shirt = $i['id'];
$shirtlvl = $itemLevel;
$shirtimg = $i['icon'];
}
if ($i['slot'] == 4) {
$chest = $i['id'];
$chestlvl = $itemLevel;
$chestimg = $i['icon'];
}
if ($i['slot'] == 5) {
$waist = $i['id'];
$waistlvl = $itemLevel;
$waistimg = $i['icon'];
}
if ($i['slot'] == 6) {
$legs = $i['id'];
$legslvl = $itemLevel;
$legsimg = $i['icon'];
}
if ($i['slot'] == 7) {
$feet = $i['id'];
$feetlvl = $itemLevel;
$feetimg = $i['icon'];
}
if ($i['slot'] == 8) {
$wrist = $i['id'];
$wristlvl = $itemLevel;
$wristimg = $i['icon'];
}
if ($i['slot'] == 9) {
$hands = $i['id'];
$handslvl = $itemLevel;
$handsimg = $i['icon'];
}
if ($i['slot'] == 10) {
$ringone = $i['id'];
$ringonelvl = $itemLevel;
$ringoneimg = $i['icon'];
}
if ($i['slot'] == 11) {
$ringtwo = $i['id'];
$ringtwolvl = $itemLevel;
$ringtwoimg = $i['icon'];
}
if ($i['slot'] == 12) {
$trinkone = $i['id'];
$trinkonelvl = $itemLevel;
$trinkoneimg = $i['icon'];
}
if ($i['slot'] == 13) {
$trinktwo = $i['id'];
$trinktwolvl = $itemLevel;
$trinktwoimg = $i['icon'];
}
if ($i['slot'] == 14) {
$cloak = $i['id'];
$cloaklvl = $itemLevel;
$cloakimg = $i['icon'];
}
if ($i['slot'] == 15) {
$main = $i['id'];
$mainlvl = $itemLevel;
$mainimg = $i['icon'];
}
if ($i['slot'] == 16) {
$off = $i['id'];
$offlvl = $itemLevel;
$offimg = $i['icon'];
}
if ($i['slot'] == 17) {
$ranged = $i['id'];
$rangedlvl = $itemLevel;
$rangedimg = $i['icon'];
}
if ($i['slot'] == 18) {
$tabard = $i['id'];
$tabardlvl = $itemLevel;
$tabardimg = $i['icon'];
}


        if($itemLevel < 187) 
        { 
            $offGear += 1; 
        } 
        array_push($item_array,(int)$itemLevel); 
    }     
    curl_close($ch);
echo '<br/><br/><p align="center">';
    //tabard and shirt will almost certainly be < 187, so we consider only if character has more than 2 low level items 
echo '<div style="width:500px; height:460px; margin-left:auto; margin-right:auto;">';
//echo'<div><div class="tbl-h-l"><div class="tbl-h-r"><div class="tbl-h-c"><div class="tbl-title"><span style="float: center">Raid Progress</span></div></div></div></div> ';
echo '<div class="tablebg" style="float:left; width:50px; height:460px;">';
echo '<div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $headimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $head .'" target="_blank" /></a></div></div><p>'. $headlvl .'</p>';
echo '<div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $neckimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $neck .'" target="_blank" /></a></div></div><p>'. $necklvl .'</p>';
echo '<div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $shoulderimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $shoulder .'" target="_blank" /></a></div></div><p>'. $shoulderlvl .'</p>';
echo '<div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $cloakimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $cloak .'" target="_blank" /></a></div></div><p>'. $cloaklvl .'</p>';
echo '<div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $chestimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $chest .'" target="_blank" /></a></div></div><p>'. $chestlvl .'</p>';
echo '<div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $shirtimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $shirt .'" target="_blank" /></a></div></div><p>'. $shirtlvl .'</p>';
echo '<div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $tabardimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $tabard .'" target="_blank" /></a></div></div><p>'. $tabardlvl .'</p>';
echo '<div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $wristimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $wrist .'" target="_blank" /></a></div></div><p>'. $wristlvl .'</p>';
echo '</div>';
echo '<div class="tablebg" style="float:right; width:50px; height:460px;">';
echo '<div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $handsimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $hands .'" target="_blank" /></a></div></div><p>'. $handslvl .'</p>';
echo '<div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $waistimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $waist .'" target="_blank" /></a></div></div><p>'. $waistlvl .'</p>';
echo '<div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $legsimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $legs .'" target="_blank" /></a></div></div><p>'. $legslvl .'</p>';
echo '<div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $feetimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $feet .'" target="_blank" /></a></div></div><p>'. $feetlvl .'</p>';
echo '<div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $ringoneimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $ringone .'" target="_blank" /></a></div></div><p>'. $ringonelvl .'</p>';
echo '<div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $ringtwoimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $ringtwo .'" target="_blank" /></a></div></div><p>'. $ringtwolvl .'</p>';
echo '<div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $trinkoneimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $trinkone .'" target="_blank" /></a></div></div><p>'. $trinkonelvl .'</p>';
echo '<div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $trinktwoimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $trinktwo .'" target="_blank" /></a></div></div><p>'. $trinktwolvl .'</p>';
echo '</div>';
echo '<div width="300" height="460" style="height:460px;"><div align="center"><b>' . $name . '</b> - ' . $level . ' ' . $class . '<br/><i>' . $guild . '</i><br/>' . 'Last Online: ' .$lastonline . '<br/>'.' <br/> <fieldset class="tablebg"><legend>Spec</legend>'. $active .' '. $inactive .' </fieldset><br/>';
echo '<fieldset class="tablebg"><legend>Professions</legend>';   
 $profession_array = array(); 
    foreach($professions->skill as $profession)
    {
echo' '.  $profession['name'] .' - '.  $profession['max'] .'/'.  $profession['value'] .'   <br/>'; 
}
echo'</fieldset><br/><fieldset class="tablebg"><legend>Item Levels</legend>';
    foreach($levelsOfInterest as $i) 
    { 
     
        $count = count(array_keys($item_array,$i)); 
        if($count > 0) 
        { 
            echo '<i>' . $count . 'x iLevel '. $i . '</i><br/>'; 
        } 
    }
echo'</fieldset><br/><fieldset class="tablebg"><legend>Health - Mana/Rage/Energy</legend>';
    $charactorbars_array = array(); 
    foreach($charactorbars->children() as $characterbars)
    {
if ($characterbars['type'] == null) { echo' Health '.  $characterbars['effective'] .' <br/>'; }
if ($characterbars['type'] == e) { echo' energy '.  $characterbars['effective'] .' <br/>'; }
if ($characterbars['type'] == m) { echo' mana '.  $characterbars['effective'] .' <br/>'; }
if ($characterbars['type'] == r) { echo' rage '.  $characterbars['effective'] .' <br/>'; }
}
echo'</fieldset><br/><fieldset class="tablebg"><legend>Stats</legend>';
foreach ($basestats->children() as $stats) 

    echo ''. $stats->getName() .' : '. $stats['effective'] .'<br/>'; 

echo'</fieldset><br/>';
    $meleestats_array = array(); 
    foreach($melee->children() as $mele)
    {
if($mele['base'] != NULL) { echo' attack power:'. $mele['effective'] .'<br/>' ;}
}
    $rangstats_array = array(); 
    foreach($rang->children() as $ran)
    {
if($ran['base'] != NULL) { echo'Ranged attack power:'. $ran['effective'] .'<br/>' ;}
}
    $healingstats_array = array(); 
    foreach($healing->children() as $heal)
    {
if ($healer == null) { $healer = $heal['value']; }
if ($heal['hastePercent'] != null) { $haste = $heal['hasteRating']; }
}
    $spellstats_array = array(); 
    foreach($spell->children() as $spel)
    {
if ($spellpower == null) { $spellpower = $spel['value']; }
}
echo' spell damage: '. $spellpower .' <br/>';
echo' bonus healing: '. $healer .' <br/>';
echo' haste rating: '. $haste .' <br/>';
echo '</div>';
echo '</div>';
echo '</div>';
echo '<div align="center">';
echo '<div style="width:300px; margin-left:auto; margin-right:auto;">';
echo '<table class="tablebg" >';
echo '<td><div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $mainimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $main .'" target="_blank" /></a></div></div><p>'. $mainlvl .'</p></td>';
echo '<td><div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $offimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $off .'" target="_blank" /></a></div></div><p>'. $offlvl .'</p></td>';
echo '<td><div  height="50" class="iconmedium" style="background: url(http://static.wowhead.com/images/icons/medium/'. $rangedimg .'.jpg) no-repeat scroll 4px 4px;"><div class="tile"><a href="http://www.wowhead.com/?item='. $ranged .'" target="_blank" /></a></div></div><p>'. $rangedlvl .'</p></td>';
echo '</table>';
echo '</div>';
echo '</div>';
//echo '<div width="100" class="tbl-f-l"><div width="100" class="tbl-f-r"><div width="300" class="tbl-f-c"></div></div></div></div><br />';


else 

echo '<form method="get" action="<?php print $_SERVER['PHP_SELF']?>">'; 
echo '        <p>Name <input type="text" name="n"></p> ';
echo '        <p>Realm <input type="text" name="r"></p> ';
echo '        <p>Zone <input type="text" name="z"></p> ';
echo '        <p><input class="btnlite" type="submit" value="GO" /></p> ';
echo '    </form> ';


<!-- ENDPHP --><br/>
<br/>
<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->
This script is for PHPBB3 only at the moment but as i sort out caching to mysql and such i will entend it more, remember this make not look brilliant but it is the BASE of what i am working on.

ALSO, this script requires you to have crackpots wowhead tooltip installed which is available from >here< compliments of Ice of board3.de and crackpot of wowhead.com

Last edited by talonos : 07/21/09 at 12:57 PM.

Offline
Reply With Quote
Old 08/06/09, 3:15 PM   #80
SentriX
Glass Joe
 
Tauren Druid
 
The Maelstrom (EU)
fixed sorry. This may be deleted

Last edited by SentriX : 08/06/09 at 3:57 PM. Reason: Fixed problem

Great Britain Offline
Reply With Quote
Old 08/10/09, 3:06 PM   #81
Krautwickerl
Glass Joe
 
Undead Warlock
 
Un'Goro (EU)
Originally Posted by inktomi View Post
I did something very similar, but in Java. Now I get "Server is busy. Please try again later." for all my requests. Seems like I got my IP banned.

Just a friendly warning to remember to put a delay between your requests. Don't want to see others getting banned.
Yes, that can happen quickly. But good news is that the ban is removed after a day or so. It seems the they just limit the number of requests per IP per day or maybe per 2 days.

For me it's working well after some struggling: WoW Ranking Lists: Search Char

Offline
Reply With Quote
Old 08/10/09, 3:12 PM   #82
Krautwickerl
Glass Joe
 
Undead Warlock
 
Un'Goro (EU)
Originally Posted by NinJOu View Post
Hey guys,

I'm looking for an armory parser that can compare raid achievement for all my guildies. We have up to 50 active members and it would be easier if raid achievement tracking could be automated =)

Does anyone have heard of this type of parser ? Or should i just begin to write my own ?

Thx in advance=)
--> WoW Ranglisten: Liste Raid Achievements (Plätze 1 bis 16)

You can also filter by guild there...

Send me a email and I can pass you the Java code...

Offline
Reply With Quote
Old 08/25/09, 3:33 PM   #83
Vitaemachina
Glass Joe
 
Draenei Shaman
 
Aegwynn
I figured this was probably a good place to toss this information/question.

I hadn't really seen most sites/scripts that hit the armory make use of this except for one, and I wasn't quite sure why that was.

Essentially, if you append &rhtml=n to any armory URL, it forces XML output, regardless of the browser you're using, which pretty much eliminates needing to send user agent data at all. You can do this right in Chrome, Safari, Opera, IE, or Firefox (even though FF gets XML by default already).

http://www.wowarmory.com/character-sheet.xml?r=Magtheridon&n=Jadissa in a non-FF browser gives you HTML.
http://www.wowarmory.com/character-sheet.xml?r=Magtheridon&n=Jadissa&rhtml=n in any browser gives you XML.
http://www.wowarmory.com/character-sheet.xml?r=Magtheridon&n=Jadissa&rhtml=y in any browser gives you HTML.
I was curious if there was any reason why more scripts weren't making use of this additional tag, or if the information just wasn't widespread. Along the same lines, I'm trying to write up a script that scoops item information out of the WoW Armory database, and crams it into a local database for later usage to limit hits against the armory. However, when I load item-info as XML, it's missing all of the statistics, socket bonuses, etc, but if I load it as HTML, it appears. Anyone know why this is?

Here's hoping I didn't break an EJ rule, I've been lurking for a year or so without posting -_-.

Offline
Reply With Quote
Old 08/26/09, 1:46 AM   #84
Wogan
Glass Joe
 
Wogan's Avatar
 
Tauren Druid
 
Jubei'Thos
To scrape item data you need to get both item-tooltip.xml and item-info.xml.

Offline
Reply With Quote
Old 09/23/09, 10:46 AM   #85
chaud
Bald Bull
 
chaud's Avatar
 
Undead Mage
 
Gurubashi
Does anyone know if armory also bans for an overload of item page requests? Also in general, what is a safe time to wait between requests?
Currently I am waiting 3 seconds between each request, but it seemed to work most of the time with 2, however I did eventually get a ban, not sure if that was due to my script or going too fast.

United States Offline
Reply With Quote
Old 10/14/09, 11:46 PM   #86
Yellowsix
Piston Honda
 
Worgen Druid
 
Suramar
Originally Posted by chaud View Post
Does anyone know if armory also bans for an overload of item page requests? Also in general, what is a safe time to wait between requests?
Currently I am waiting 3 seconds between each request, but it seemed to work most of the time with 2, however I did eventually get a ban, not sure if that was due to my script or going too fast.
I have recently written a website that accesses the armory (Team Robot WoW Simulator), and ran into the banning problem as well. It was really irritating, so I thought I'd add some information that might be useful to other people:

1. I have a little program that runs through about 1000 items and loads item-info.xml for each of them in just a few seconds, and it doesn't get me banned. It's not just how quickly you send requests... there must be some total volume limit, or sustained rate limit.

2. I scaled back my site to send 8 requests per second, and so far I haven't been banned. Though traffic has been much lower... highest traffic with that limit in place was 2000 users in one day. I'll provide more info if I run into problems when (hopefully) the site's traffic increases. I'd estimate that about 8000 armory requests were sent that day, sometimes in rapid bursts, sometimes with a lot of time between them.

3. Most of my requests are for character-sheet.xml and character-talents.xml... I cache the generic item-info.xml and item-tooltip.xml indefinitely (I just flush the cache and let it rebuild itself whenever items get updated by blizzard). Then I use logic to get a character's full info (which gems they have, which enchants on each item, etc.). This really reduces the amount of armory traffic that you need to do in order to load a character's complete information from the armory -- before I was loading each character-specific item-tooltip.xml, which requires 19 armory requests just to load 1 character. Yeah... that didn't last very long.


As I get further information about the armory banning, I'll post it here -- it's a really frustrating problem for developers using the armory, and there isn't very much good info about it.

Offline
Reply With Quote
Old 10/15/09, 12:03 AM   #87
chaud
Bald Bull
 
chaud's Avatar
 
Undead Mage
 
Gurubashi
Have you been doing 8 per second for character-sheet? I am running several worker threads to fill a db right now just waiting 2 seconds in between requests as I somehow got IP banned for requesting several (~10?) with no wait time.

e: When just sleeping for one second, I get a temp ip ban.

Last edited by chaud : 10/15/09 at 2:12 AM.

United States Offline
Reply With Quote
Old 10/15/09, 3:37 AM   #88
Yellowsix
Piston Honda
 
Worgen Druid
 
Suramar
I talked to one of the guys who works on the program Xfire, and they do some armory stuff. He recommended the 8/sec number to me... said it works ok, but they sometimes will still get banned every now and again. I'm not exactly certain what all they parse or how often they do it -- I'll see if I can get more details. But yes, my site has been running with the 8/sec limit, sending mostly character-sheet and character-talents requests, with a few item-tooltip requests here and there. My traffic hasn't been that high this week though... so probably not a good stress test.

It's too bad that the armory doesn't allow flash/silverlight plug-ins to send requests directly to the armory... that would solve the problem for a website like mine at least. I tried contacting them via email about that, but they of course never responded.

Offline
Reply With Quote
Old 10/16/09, 7:25 PM   #89
Zigizi
Von Kaiser
 
Zigizi's Avatar
 
Troll Shaman
 
Borean Tundra
Getting XML from armory into Yahoo Pipes?

Hey guys- I notice that the PHP modules and the perl libraries do some kind of browser spoofing to bypass the armory's server-side html rendering. I was wondering if anyone had any luck getting something similar working with the Yahoo Pipes "Fetch Data" module. I would like to turn my xml achievements into an RSS feed, and it would be quite simple if I could get the raw XML into Yahoo Pipes, but it doesn't seem to be able to extract the xml. Are there any parameters I can pass into the armory that will force it to return XML, or is browser spoofing the only way?

Offline
Reply With Quote
Old 10/16/09, 7:41 PM   #90
chaud
Bald Bull
 
chaud's Avatar
 
Undead Mage
 
Gurubashi
Does the &rhtml=n on the end of the url not work?

United States Offline
Reply With Quote
Old 10/16/09, 8:06 PM   #91
Zigizi
Von Kaiser
 
Zigizi's Avatar
 
Troll Shaman
 
Borean Tundra
Originally Posted by chaud View Post
Does the &rhtml=n on the end of the url not work?
Yes, that's exactly what I was looking for.

Offline
Reply With Quote
Old 01/15/10, 9:31 AM   #92
Acacia
Von Kaiser
 
Night Elf Druid
 
Dragonblight (EU)
Until recently I used a generated forum signature image borrowed from perpetualguild.com featuring "Latest Earned Achievement" pulled from the armory. The generator seems to have been pulled a few days ago though as the page now returns a 404. Anyone have any suggestions on how to recreate/replicate the script used so I can host it myself? (im no coder but can probably figure it out with a few pointers) Or is there a better way to go about it with the new RSS feeds?

Cashed version of the signature instructions: http://74.125.77.132/search?q=cache:...ient=firefox-a

Look of the generated image: http://perpetualguild.com/achievement_sig/ - Google-sökning


Offline
Reply With Quote
Old 01/24/10, 8:45 PM   #93
tsigo
Don Flamenco
 
tsigo's Avatar
 
Tsigo
Undead Priest
 
No WoW Account
Last week I crawled every item-info.xml page on the Armory using a delay of 2.5 seconds between requests and didn't run into any banning issues at all.

Offline
Reply With Quote
Old 01/24/10, 9:48 PM   #94
Watlok
Glass Joe
 
Undead Mage
 
Mal'Ganis
I see people using a lot of different methods in PHP to request data and I figured this might be useful to some people. I use it in a personal project and it should work on nearly all php configurations. You can easily add different pages by adding a new function that follows the format of the character/guild functions, and all the input strings are automatically formatted for web requests by the http_build_query command. There are (quite) a few things done poorly in this code, but the code is easily expandable and easy to plug in to any project that grabs xml from the armory.

Oh, right, it supports US/KR/TW/EU realms as well. It also supports non-english sites.

    define("DEAFULT_REGION""US");
    
define("DEFAULT_LANG""en-us");

    class 
ArmoryData {
        public 
$region=DEAFULT_REGION;
        public 
$lang=DEFAULT_LANG;
        
        private function 
GetXml($region$page$url_req) {
            
$region=strtoupper($region);
                    
            if (
$region == "US"
                
$url='http://www.wowarmory.com/';
            else if (
$region == "KR")
                
$url='http://kr.wowarmory.com/';
            else if (
$region == "EU")
                
$url='http://eu.wowarmory.com/';
            else if (
$region == "TW")
                
$url='http://tw.wowarmory.com';
            else
                return -
1;
            
            
$url.=$page;
            
            if (!
is_array($url_req))
                return -
2;
                
            
$url_req['rhtml']='n';
                
            
$url_req=http_build_query($url_req);
            
$url.="?".$url_req;
            
            
$header "Content-Type: text/xml\r\n";
            
$header .= "Accept-Language: " $this->lang "\r\n"

            
$params = array('http' => array(
                
'method' => 'GET',
                
'header' => $header,
                
'timeout' => 5
            
));

            
$context stream_context_create($params);
            
$xml file_get_contents($urlfalse$context);
         
             if (
strpos($xml'xml'))
                return 
$xml;
            else
                return -
3;
        }
        
        public function 
FormatRealm($realmStr) {
            
$realm=explode('-'$realmStr);
            
            if (
strlen($realm[0]) > 2) {
                
$realm[1]=$realm[0];
                
$realm[0]=$this->region;
            }
            
            return 
$realm;
        }
        
        public function 
Char($realmStr$char) {
            
$page='char-sheet.xml';
            
$realm=$this->FormatRealm($realmStr);
                
            
$url_req=array(
                
'r' => $realm[1],
                
'c' => $char
            
);
            
            return 
$this->GetXml($realm[0], $page$url_req);
        }

        public function 
Guild($realmStr$guild) {
            
$page='guild-info.xml';
            
$realm=$this->FormatRealm($realmStr);
            
            
$url_req=array(
                
'r' => $realm[1],
                
'gn' => $guild
            
);
                
            return 
$this->GetXml($realm[0], $page$url_req);
        }

    };

    
$armory=new ArmoryData();
    
$guild_info=$armory->Guild("US-Realmname""GuildName"

Last edited by Watlok : 01/28/10 at 8:28 AM.

Offline
Reply With Quote
Old 02/16/10, 11:49 AM   #95
schoeps
Glass Joe
 
Human Warrior
 
Staghelm
Originally Posted by Trouble View Post
You have to throttle your requests. If you exceed 45 requests in like a minute (or one per 1.5 seconds over a sustained period) you'll start pulling 503's. If you keep hammering after you're pulling 503's then it'll ban you for a day or so. It only lasts for a day or so, but it's your warning.
is this confirmed? I am at about a rate of 10 per minute on btmmo.com... ban is typically 12 hours...

Offline
Reply With Quote
Old 02/17/10, 12:56 PM   #96
chaud
Bald Bull
 
chaud's Avatar
 
Undead Mage
 
Gurubashi
You should be safe doing at least double that.

United States Offline
Reply With Quote
Old 02/24/10, 7:40 PM   #97
Chack
Piston Honda
 
Troll Rogue
 
Twilight's Hammer (EU)
Anyone else having trouble lately with the armory xml fetching? I use java to fetch the gear of a character to import them to my application, but for some reason the armory redirects my java client to the battle net login, which then redirects it back to the original page and thus gets stuck in an endless redirect loop.

Offline
Reply With Quote
Old 02/24/10, 7:59 PM   #98
 Shadowed
Soda Popinski
 
Tauren Druid
 
Mal'Ganis
You need to pass a cookie with "loginChecked=1" in it when requesting from the EU armory or you'll get stuck in an infinite loop. They broke something with the maintenance last night (early this morning?).

United States Offline
Reply With Quote
Old 02/25/10, 3:30 AM   #99
Olison
Glass Joe
 
Olison's Avatar
 
Night Elf Hunter
 
Ravencrest (EU)
Originally Posted by Shadowed View Post
You need to pass a cookie with "loginChecked=1" in it when requesting from the EU armory or you'll get stuck in an infinite loop.
That's what I was looking for, cheers!

Offline
Reply With Quote
Old 02/26/10, 3:02 AM   #100
Oldertarl
Glass Joe
 
Oldertarl's Avatar
 
Dwarf Paladin
 
Lightbringer (EU)
It seems the Armory has fixed the cookie bug.
No need to pass extra strings anymore.

Last edited by Oldertarl : 02/28/10 at 6:39 PM.

Offline
Reply With Quote
Reply

Go Back   Elitist Jerks » Public Discussion

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Warcraft Armory Nite_Moogle Public Discussion 336 06/29/07 4:46 PM
Unpopular talents, or the Armory in action Navaash Public Discussion 303 05/16/07 1:24 AM
In Game Armory Mod Maligne User Interface and AddOns 29 05/07/07 11:37 AM
[All Classes] Armory data used to see 31 and 41 pt talent use. Nomad_Wanderer Class Mechanics 2 05/03/07 11:23 AM