Karamzin007
12/23/2019 - 5:45 PM

WebClient wc = new WebClient();

WebClient wc = new WebClient();
wc.Headers.Add(":authority: affiliates.bettingpartners.com");
wc.Headers.Add("accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3");
wc.Headers.Add("accept-encoding: gzip, deflate, br");
wc.Headers.Add("accept-language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7");
wc.Headers.Add("upgrade-insecure-requests: 1");
wc.Headers.Add("referer: https://affiliates.bettingpartners.com/statistics.php");
wc.Headers.Add("cookie: __cfduid=d4cc88dfb142802be5e2eb8f767165f431564655625; MYAFFSESSID=qlnp8kpvvsn0au6shbu4j2vca8; bp_username=afflabs121");
wc.Headers.Add(project.Profile.UserAgent);

using (MemoryStream stream = new MemoryStream(wc.DownloadData(@"https://www.rsdn.org/forum/dotnet/1089603.hot")))
{
    var sw = new StreamWriter(stream);
    sw.Flush();

    stream.Position = 0;
    var sr = new StreamReader(stream);
    text = sr.ReadToEnd();
}