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.ToSt ring)
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 :-)" <ti*****@netvision.net.il> escribió en el mensaje
news:%2****************@TK2MSFTNGP09.phx.gbl...
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;-)