Real-time information from other websiteshttp://forums.asp.net/t/319873.aspx/1?Real+time+information+from+other+websitesTue, 09 Sep 2003 10:37:52 -0400319873319873http://forums.asp.net/p/319873/319873.aspx/1?Real+time+information+from+other+websitesReal-time information from other websites Hi: Would anyone know how to get real-time information from other websites(x-rates etc.) that i can use in my web-based applications. Thanks in advance for your help. rgoel 2003-08-26T12:49:15-04:00333444http://forums.asp.net/p/319873/333444.aspx/1?Re+Real+time+information+from+other+websitesRe: Real-time information from other websites you want to scrape the information off the website, heres some code i use for getting the unreal tournament stats off epic <pre class="prettyprint">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(&quot;http://ut2003stats.epicgames.com&quot;); sr = new System.IO.StreamReader(s); string str = sr.ReadToEnd(); if(str.IndexOf(&quot;Unreal Tournament 2003 Global Stats Summary&quot;) &gt; 0) { nIndexStart = str.IndexOf(&quot;Unreal Tournament 2003 Global Stats Summary&quot;, nIndex); if(nIndexStart &gt; 0 ) { nIndex = str.IndexOf(&quot;&lt;table &quot;, nIndexStart -200); if(nIndex &gt; 0 ) { nIndexEnd = str.IndexOf(&quot;&quot;, nIndex&#43;1); } } } sr.Close(); s.Close(); str = str.Substring((nIndexStart), (nIndexEnd &#43; 9) - nIndexStart).Replace(&quot;playerstats.php?player&quot;,&quot;stats.aspx?id&quot;); Literal1.Text &#43;= &quot;&lt;div align='center'&gt; <table> <tbody> <tr> &quot; &#43; str &#43; &quot; </tr> </tbody> </table> Live stats courtesy of Epic Games&lt;/div&gt;&quot;;</pre> 2003-09-09T08:58:34-04:00