Quote Originally Posted by getlowdogg369
vb Code:
  1. Imports System.Net
  2. Imports System.Text.Encoding
  3.  
  4. Public Class Form1
  5.  
  6.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  7.         TextBox1.Text = Nothing
  8.         Dim tcp As New Sockets.Socket(Sockets.AddressFamily.InterNetwork, Sockets.SocketType.Raw, Sockets.ProtocolType.Raw)
  9.         tcp.Connect(TextBox2.Text, 80)
  10.         If tcp.Connected = False Then Exit Sub
  11.         tcp.Send(ASCII.GetBytes("GET / HTTP/1.0" & vbCrLf & vbCrLf))
  12.         Dim buf(1024) As Byte
  13.         Dim bytes As Int32 = tcp.Receive(buf, 1024, 0)
  14.         TextBox1.Text &= ASCII.GetString(buf, 0, bytes)
  15.         Do While bytes > 0
  16.             bytes = tcp.Receive(buf, 1024, 0)
  17.             TextBox1.Text &= ASCII.GetString(buf, 0, bytes)
  18.         Loop
  19.     End Sub
  20. End Class
That's my exact code straight out of the program. Also, I'm not receiving any errors/warnings. I've typed "www.google.com" without the quotes into TextBox2 and it still frozed. Also, how does this give the client his/her computer's remote IP address? I just want it to do basically the same as IP Chicken or www.whatismyip.org.
Code:
Dim tcp As New Sockets.Socket(Sockets.AddressFamily.InterNetwork, Sockets.SocketType.Stream, Sockets.ProtocolType.Tcp)
forgot I changed it when messing around.