The First step is to insert javascript into PHP page. In puts res.body i can see if it works and it works. The second step is to activate the submit button from the first step, and this isn't working. thnx Fred schreef: > resp.body is a php page => purpose is to see of step 1 is working > > 7stud -- schreef: > > What's in step 1's resp.body? Is it html? Do you want to extract a url > > from that html and send a request to that url? > > > Fred schreef: >> Thanx Darren for the info >> >> What i want to do: >> >> Interact with a site and change behaviour without going to the site >> itself. >> >> I have to do 2 steps. >> >> >> def connect >> uri = URI.parse(BASE_ADDRESS) >> HTTP.version_1_1 >> @http = HTTP.start(uri.host, uri.port) >> end >> >> 1. The first one succeed with >> >> connect >> req = HTTP::Post.new("...") >> add_headers req, "......" >> res = @http.request(req) >> puts res.body >> @http.finish >> >> When i look into res.body i see that the first step is good. >> >> 2. Now the second step is to simulate a POST (submit button) from the >> first step. >> >> req = HTTP::Post.new("....") >> add_headers req, "...." >> connect >> res = @http.request(req) >> puts res.body >> @http.finish >> >> When i look into res.body i see nothing. >> I also tried the connect before the req in the second step but it >> changed nothing. >> >> The second step has to change the first step ( activate the submit >> button) but it doesn't work. >> >> I hope you understand it a little bit. >> >> Can someone help me with this? >> >> Thanks >> >> >> >> darren kirby schreef: >>> quoth the Fred: >>>> Hello, >>>> >>>> I'm lost. >>>> Can someone explain good to me what the difference is between these 2 >>>> methods? >>> >>> 'GET' and 'POST' are two 'request methods' which are part of the HTTP >>> spec. Your two methods are ruby implementations of such request >>> methods. Read this: http://en.wikipedia.org/wiki/Http#Request_methods >>> >>> ..and you will see they are quite different. >>> >>>> I have a HTTP:Post and when i check the body, i see exacly what he has >>>> to do. But it doesn't do it in reality. >>>> How can i resolve the problem? >>> >>> I have no idea what you are getting at here. Please repost with: >>> * A clear description of what you want to accomplish >>> * How what you are doing now is failing (include error messages) >>> * Your failing code >>> * excerpt of your data causing a failure (if applicable) >>> >>> If you include all this, you will certainly recieve a more helpful >>> response. >>> >>>> thank you >>> >>> -d