dcsimg
A Flash Developer Resource Site

Page 1 of 4 1234 LastLast
Results 1 to 20 of 68

Thread: World of Warcraft Armory xml feed...

  1. #1
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338

    World of Warcraft Armory xml feed...

    Hey all,

    there's a section on the world of warcraft site where you see your character/guild rankings along with alot of info. if you view source it's very clean xml, but if you try to load that xml into an app it comes up blank. It seems to read what browser your using, then give xml results if it's supported..

    My question is, is there some way to spoof the site into thinking your using a supported browser? or some other options? Thanks all!

    here's an example link (im Leetamus woot woot )
    http://www.wowarmory.com/guild-info....ash&n=LOOM&p=1
    Evolve Designs Interactive Media
    the natural selection

  2. #2
    5+5=55 Schfifty Five's Avatar
    Join Date
    Jun 2006
    Posts
    698
    This will do it (if you're using firefox):

    https://addons.mozilla.org/en-US/firefox/addon/59

  3. #3
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    hmm that's pretty cool, installed hehe. although it doesn't help with my problem as i need to pull the xml into flash so i think i need some sort of php script that will spoof itself as firefox then echo out the xml. thanks : D
    Evolve Designs Interactive Media
    the natural selection

  4. #4
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    bump
    Evolve Designs Interactive Media
    the natural selection

  5. #5
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    what happens when you call the XML/page in flash?
    http://www.wowarmory.com/character-s...ash&n=Leetamus

    as your source?

    can you parse the XML and trace it out?

    Update: nope.. I even tried to bounce it off a proxy.. it seems to be passing alot of vars to build the xml...

    I can only get the doc type to output..

  6. #6
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    both of these return the same results;

    Code:
    /*
    var wowXML:XML = new XML();
    wowXML.ignoreWhite = true;
    wowXML.onLoad = function(){
    	trace("OUTPUT: "+wowXML);
    }
    wowXML.load("http://www.wowarmory.com/character-sheet.xml?r=Gorgonnash&n=Leetamus");
    */
    
    var proxyVars:LoadVars = new LoadVars();
    var wowXML:XML = new XML();
    wowXML.ignoreWhite = true;
    wowXML.onLoad = function(success) {
    	if (!success) {
    		trace("LOAD NO GOOD");
    		wowData_txt.text = "LOAD NO GOOD";
    	} else {
    		trace("returned: "+wowXML);
    		wowData_txt.text = wowXML;
    	}
    }
    proxyVars.dataURL = "http://www.wowarmory.com/character-sheet.xml?r=Gorgonnash&n=Leetamus";
    proxyVars.sendAndLoad("http://www.yourdomain.com/proxy.php", wowXML, "POST");

  7. #7
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    yeah that's what i've found too, someone has managed to do it so i know it can be done with some fancy scripting. check out the examples section here:
    http://wow.ukgl.co.uk/
    Evolve Designs Interactive Media
    the natural selection

  8. #8
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    ask them how they are doing it.. maybe some sort of script that is scraping the code for specific "ID's"..

  9. #9
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    they use coldfusion so their method won't work for me, i don't have access to a coldfusion server
    Evolve Designs Interactive Media
    the natural selection

  10. #10
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    I found this code at gotoandlearn, the creator says it works, but it I can't get it running.. maybe someone can see why?

    PHP Code:
        var rootURL:String "http://www.wowarmory.com/character-sheet.xml?";
        var 
    charRealm:String "Duskwood";
        var 
    charName:String "Shrapnil";
        var 
    charSheetXML_URL:String rootURL +"r="charRealm +"&n="charName;
        
    // EXAMPLE URL : http://www.wowarmory.com/character-sheet.xml?r=Duskwood&n=Shrapnil
        
    trace(charSheetXML_URL);

        var 
    loadedXML:LoadVars = new LoadVars();
        
    loadedXML.addRequestHeader("User-Agent""Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2");

        var 
    resultXML:LoadVars = new LoadVars();
        
    resultXML.onLoad = function(success:Boolean){
           if(
    success){
              
    trace("XML loaded - Character Sheet");
              
    trace(unescape(this));
              
    output_txt.text unescape(this);
           }else{
              
    trace("unable to load XML data");
              
    output_txt.text "-FAILED-";
           }
        }
        
    output_txt.text "-LOADING-";
        
    loadedXML.sendAndLoad(charSheetXML_URLresultXML"POST"); 
    Evolve Designs Interactive Media
    the natural selection

  11. #11
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    In case anyone else is trying to do this, the above code actually does work fine, but only using Flash8.... Run the same code in CS3 (using actionscript2) and it returns the html version, in Flash 8 you get the XML which is a total mystery to me!
    Evolve Designs Interactive Media
    the natural selection

  12. #12
    Junior Member
    Join Date
    Apr 2008
    Posts
    1
    I know this is a very old topic, but this didn't really get resolved very well in my opinion. Anyway, I was reading through various googles for a solution for a different problem (still regarding armory, but kinda different) and came across this post.

    For those of you wondering, all you should need to do to "spoof" the browser unless Blizzard have been sneaky is to add the "User-Agent" header to your request.

    In the above script, this is the line:
    Code:
    loadedXML.addRequestHeader("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2");
    The 2nd parameter there can be changed to various different strings to "spoof" different browsers- you'll have to experiment and all I can really suggest is to google something like "User-Agent Codes" or chuck some php in a file and run it in a specific browser to get it's code.

    Now, I don't know much flash (I'm a PHP developer) but HTTP requests are all the same... Enjoy

  13. #13
    Junior Member
    Join Date
    Apr 2008
    Posts
    13
    You dont need coldfusion to load wow armory data in flash (or php,asp etc etc). You just need more practise and perhaps alittle imagination :P

    http://www.oefentherapieinamsterdam.nl/mdk/index.html

    directly loaded from armory pages. PM for pointers, but dont think i'll give .fla away :P

  14. #14
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    not that I care one bit about WoW..

    but I dont get the secret?

    Either it DOES or does NOT return an XML feed.?

    Do you need a PROXY?

    or as suggested some HEADER added?

    there is no need for any secret PM's.. this place is a community for learning & sharing..


    for example this URL used for an example:
    http://www.wowarmory.com/character-s...ash&n=Leetamus

    will parse to a page if viewed in a browser... if you call that in Flash you only get this as a return:

    OUTPUT: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    do you need to send more data before it will parse correctly? I wouldnt think so as pasting that URL works fine.. no extra params..

    I see on yoru 'site' you say the data is taking diectly off the sevrer.. due to the MDK hacking skills..

    but above you say there is NO php script involved..

    and your NOT just scraping the source code??

    what does the : l33txml.php file do then??


    thanks

  15. #15
    Junior Member
    Join Date
    Apr 2008
    Posts
    13
    hehe fast reply there... thought this thread was way dead

    it worked without the php copy file but i had to use it to make sure that if armory site is down there wouldnt be lots of timeouts.. this way the "server down message" - comes way faster (maybe need to cache in future).

    also take my page not too serious

    theres no xml feed used in this because somehow the armory xml is protected by blizzard... i mean if they want people to use it they wouldnt make it this hard to use.

    basicly my flash reads the source code of the page and scraps it out. prolly can be done easier... i bet u alrdy took a looksy at my source by now :P

    if anyones interested in my source (no xml parsing, just a work-around source parser) ill post it later

  16. #16
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    ok.. so there is NO XML feed you are getting/using (just want to clear that out)..


    yes if you want to do some source code parsing.. you can do that.. I actually think PHP to do so might have been easier?? (not to sure as I didnt look at your code much)

    the IDEAL way (at least to me) would be to get the XML somehow..

    whether by adding a header or using a proxy (which didnt work for my tests anyways)

    actually I just tested Evolve Designs post.. and hes 100% correct.. all you need to do is add the header.. and the correct XML data will be returned:

    PHP Code:
    var sentXML:XML = new XML();
    sentXML.addRequestHeader("User-Agent""Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2");
    sentXML.ignoreWhite true;

    var 
    wowXML:XML = new XML();
    wowXML.ignoreWhite true;
    wowXML.onLoad = function(success) {
        if (!
    success) {
            
    trace("LOAD NO GOOD");
            
    wowData_txt.text "LOAD NO GOOD";
        } else {
            
    trace("returned: "+wowXML);
            
    wowData_txt.text wowXML;
        }
    }
    sentXML.sendAndLoad("http://www.wowarmory.com/character-sheet.xml?r=Gorgonnash&n=Leetamus"wowXML"POST"); 

    also the first object doesnt even have to be an XML object..it an be a LoadVar() object.. just need to add the header to it when you send it off to Blizzard..

    NOW you can make a nice graphical display of whatever you want.. (dont know jack about WoW) but the details that come back NOW can be used in anything... any kind of graphical display of the data..

  17. #17
    Junior Member
    Join Date
    Apr 2008
    Posts
    13
    ah nice... ill test it tomorrow

  18. #18
    Moderator whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    You can get every power,spell,ability and their raking..everything.. you can even load their icons if you wanted..LOL

    Since I dont play WoW.. can I ask.. why people want this feed so bad?

    What could you use it for? or you just want to display the same data on your personal site or something?

    This wouldnt have any effect on game play or anything....right

  19. #19
    Junior Member
    Join Date
    Apr 2008
    Posts
    13
    It has 0,0 effect on in-game stuff. Its just people want their info off the armory pages in their website. (ie. memberlist etc).

    btw you are right the header trick does the trick

  20. #20
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    I used it make a little desktop app for guild members which lists all guild members and their rank,class, level etc. That said, a sweet use would be an addon which would list the enemy persons gear and stats when you mouse over them.. (for those that don't play wow you can't inspect enemys to check out their stuff, but you can pull that data from the armoury..) with all the addons out there im amazed nobody has done this before
    Evolve Designs Interactive Media
    the natural selection

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center