// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.IO; using System.Net; namespace E { public class Program { public static void Main(string[] args) { WebRequest wr = WebRequest.Create("http://armory.wow-europe.com/character-sheet.xml?r=Shadowsong&n=Antares"); string xml = new StreamReader(wr.GetResponse().GetResponseStream()).ReadToEnd(); Console.WriteLine(xml); WebRequest wr2 = WebRequest.Create("http://armory.wow-europe.com/character-sheet.xml?r=Shadowsong&n=Antares"); ((HttpWebRequest)wr2).UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"; string xml2 = new StreamReader(wr2.GetResponse().GetResponseStream()).ReadToEnd(); Console.WriteLine(xml2); } } }