Results 1 to 1 of 1
Mar 11, 2010, 11:36 #1
- Join Date
- Oct 2003
- Tenerife, Spain / UK
- 0 Post(s)
- 0 Thread(s)
ASP spoofing a user-agent for XML parser
I'm trying to parse a Character Atom feed from the World of Warcraft Armoury and display on a fan site.
Here's my code
set xml = Server.CreateObject("Microsoft.XMLDOM")
xml.async = false
xml.SetProperty "ServerHTTPRequest", True
xml.ResolveExternals = True
xml.ValidateOnParse = True
set xsl = Server.CreateObject("Microsoft.XMLDOM")
xsl.async = false
PROBLEM: The World of Warcraftt armory is intelligent enough to look for the "User-Agent" header, and act different depending on the result.
If the User-Agent seems capable of XML/XSLT rendering, the armory will let the XML go through, otherwise it'll do the rendering server side. If you want to get the XML, you have to spoof the User-Agent to one which is recognized as one able to do XML/XSLT rendering.
How would I trick the WoW armoury into thinking my ASP script is web browser capable of rentding XML/XSLT For example: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1) Gecko/20061010 Firefox/2.0"?