+ 1
Get access to elements and event form of web-page from program C, C#, C++ etc
Hi dear friends. Please give information advice , about libraries and functions to let implement question. I want to write a little code to automatically upgrade information from database on site.
1 Respuesta
+ 1
In c# you can read data from webpages by HttpWebRequest. See code below:
string html = string.Empty;
string url = @"https://www.sololearn.com";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.AutomaticDecompression = DecompressionMethods.GZip;
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
using (Stream stream = response.GetResponseStream())
using (StreamReader reader = new StreamReader(stream))
{
html = reader.ReadToEnd();
}
Console.WriteLine(html);