Try:
Dim objTcpClient As System.Net.Sockets.TcpClient
Dim objNetworkStream As System.Net.Sockets.NetworkStream
Dim iBytesCount As Integer
Dim objBuffer(2000) As Byte
Dim sData As String
Try
objTcpClient = New System.Net.Sockets.TcpClient
objTcpClient.Connect("pop.mail.yahoo.com", 110) // your data
here
objNetworkStream = DirectCast(objTcpClient.GetStream(),
System.Net.Sockets.NetworkStream)
iBytesCount = objNetworkStream.Read(objBuffer, 0,
objBuffer.Length)
If iBytesCount > 0 Then
sData = System.Text.Encoding.ASCII.GetString(objBuffer)
MessageBox.Show(sData)
End If
Catch objException As Exception
MessageBox.Show(objException.GetBaseException.ToString)
Finally
If Not (objNetworkStream Is Nothing) Then
objNetworkStream.Close()
End If
If Not (objTcpClient Is Nothing) Then
objTcpClient.Close()
End If
End Try
--
Carlos J. Quintero (Visual Developer - .NET MVP)
The MZ-Tools all-in-one add-in, now for .NET:
http://www.mztools.com
"T :-)" <(E-Mail Removed)> escribió en el mensaje
news:%(E-Mail Removed)...
> hi,
>
> I have a list of URL's which i would like to check if they are response
> (return 200 OK).
>
> what is the best way to do that ?
>
> Thanks,
>
> T;-)
>
>