Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Sep 09, 2003 10:37 AM by morritt
Member
20 Points
4 Posts
Aug 26, 2003 12:49 PM|LINK
220 Points
44 Posts
Sep 09, 2003 08:58 AM|LINK
System.Net.WebClient wc = new System.Net.WebClient(); System.IO.Stream s; System.IO.StreamReader sr; string returnval; int nIndexStart = 0; int nIndexEnd = 0; int nIndex = 0; s = wc.OpenRead("http://ut2003stats.epicgames.com"); sr = new System.IO.StreamReader(s); string str = sr.ReadToEnd(); if(str.IndexOf("Unreal Tournament 2003 Global Stats Summary") > 0) { nIndexStart = str.IndexOf("Unreal Tournament 2003 Global Stats Summary", nIndex); if(nIndexStart > 0 ) { nIndex = str.IndexOf("<table ", nIndexStart -200); if(nIndex > 0 ) { nIndexEnd = str.IndexOf("", nIndex+1); } } } sr.Close(); s.Close(); str = str.Substring((nIndexStart), (nIndexEnd + 9) - nIndexStart).Replace("playerstats.php?player","stats.aspx?id"); Literal1.Text += "<div align='center'>
rgoel
Member
20 Points
4 Posts
Real-time information from other websites
Aug 26, 2003 12:49 PM|LINK
Morritt
Member
220 Points
44 Posts
Re: Real-time information from other websites
Sep 09, 2003 08:58 AM|LINK
System.Net.WebClient wc = new System.Net.WebClient(); System.IO.Stream s; System.IO.StreamReader sr; string returnval; int nIndexStart = 0; int nIndexEnd = 0; int nIndex = 0; s = wc.OpenRead("http://ut2003stats.epicgames.com"); sr = new System.IO.StreamReader(s); string str = sr.ReadToEnd(); if(str.IndexOf("Unreal Tournament 2003 Global Stats Summary") > 0) { nIndexStart = str.IndexOf("Unreal Tournament 2003 Global Stats Summary", nIndex); if(nIndexStart > 0 ) { nIndex = str.IndexOf("<table ", nIndexStart -200); if(nIndex > 0 ) { nIndexEnd = str.IndexOf("", nIndex+1); } } } sr.Close(); s.Close(); str = str.Substring((nIndexStart), (nIndexEnd + 9) - nIndexStart).Replace("playerstats.php?player","stats.aspx?id"); Literal1.Text += "<div align='center'>