From: John Pritchard-williams Date: 2008-09-01T18:31:06+09:00 Subject: Re: Simple, simple socket question This works on my system (Just brings back 128 bytes HTTP header). (Note the extra '\n'... ... # Strings changed from single quotes to double quotes. # (As per last poster's suggestion) require 'socket' mySock = TCPSocket::new("www.google.com", 80) mySock.write("GET / HTTP/1.1\n") mySock.write("Host: www.google.com\n") mySock.write("\n\n") # extra "\n" added. data = mySock.recv(128) mySock.close puts data ... Cheers John -- Posted via http://www.ruby-forum.com/.