From: Hey You Date: 2007-04-11T20:10:22+09:00 Subject: How come this doesn't work? require 'socket' host = 'www.neopets.com' begin h = TCPSocket.new(host,80) rescue puts "error: #($!)" else h.print "POST /login.phtml?username=r3MaDi&password=mangaka02&destination=/petcentral.phtml HTTP/1.1\r\nContent-Type: text/html; charset=UTF-8\r\nHost:"+host+"\r\n\r\n" h.print "GET /objects.phtml?type=inventory HTTP/1.1\r\n\r\n" a = h.read puts a File.open('Log.txt','w') do |f| f.print a end end gets It just pretty much does the first request which is the post but then when I tell it to get the other page it doesn't do anything. I made this code a few seconds ago so I am searching for the answer and I am reading RFC2616. -- Posted via http://www.ruby-forum.com/.