Try this:
Code:
'You must have a Winsock control loaded into the project.
'This code assumes the control is called Winsock1.
'There also must be a text box on the form which is called txtWebPage.
'First, connect to the remote computer using the following code:
Winsock1.RemoteHost = "visualbasic.about.com"
Winsock1.RemotePort = 80
Winsock1.Connect
Dim strCommand as String
Dim strWebPage as String
strWebPage = _
"http://visualbasic.about.com/compute/visualbasic/index.htm"
strCommand = "GET " + strWebPage + " HTTP/1.0" + vbCrLf
strCommand = strCommand + "Accept: */*" + vbCrLf
strCommand = strCommand + "Accept: text/html" + vbCrLf
strCommand = strCommand + vbCrLf
Winsock1.SendData strCommand
The Winsock control will attempt to download the page. When is receives some data from the server, it will trigger the DataArrival event.
Dim webData As String
Winsock1.GetData webData, vbString
TxtWebPage.Text = TxtWebPage.Text + webData