Last post Jun 28, 2017 03:10 AM by Eric Du
Jun 27, 2017 05:50 PM|cenk1536|LINK
I need to get data (draw number, draw date, ball1, ball2, ball3, ball4, ball5 and ball6) from a web site (http://lotobayisi.com/Super-Butun-Veriler.aspx) I would like to make a service to check
every week if there is a new draw then get this row and write it to a database. Hope u can help me.
Jun 27, 2017 08:15 PM|ryanbesko|LINK
Read up and learn Html Agility Pack. Then use it to parse the table you want and store it in a database or something, mirroring the table basically.
Jun 28, 2017 03:10 AM|Eric Du|LINK
According to your description, as far as I know, you could try the following steps:
1. you could use the following code to get html code from a website:
WebRequest req = WebRequest.Create("http://www.google.com");
WebResponse resp = req.GetResponse();
Stream s = resp.GetResponseStream();
StreamReader sr = new StreamReader(s,Encoding.ASCII);
string doc = sr.ReadToEnd();
2. You could convert doc to other format, then get the element and value from the doc.
3. You could use ado.net to save the value to the database.
4. You could refer to this tutorial about how to run a scheduled task: