วันพฤหัสบดีที่ 13 กุมภาพันธ์ พ.ศ. 2557

Download ข้อมูล หน้า WEB เช่นข้อมูลราคาหุ้นทำไง โดย VB.NET

Download ข้อมูล หน้า WEB เช่นข้อมูลราคาหุ้นทำไง โดย VB.NET


ตามนี้เลย
เราจะใช้ Class ที่ชื่อ WebClient 



Using client As New WebClient 
     client.Headers("User-Agent") = "helloxxx/2.1"
     client.Headers("Accept-Encoding") = "gzip"
 
     Dim arr() As Byte = client.DownloadData("http://expert-programming-tutor.com/") 
     Console.WriteLine(arr.Length)
     Console.WriteLine(client.ResponseHeaders("Content-Encoding"))
 End Using


โดย ทีมงาน
http://expert-programming-tutor.com/
รับสอนเขียนโปรแกรมคอมพิวเตอร์
รับสอนเขียนโปรแกรมVB.NET




ไม่มีความคิดเห็น:

แสดงความคิดเห็น