From: Coosa Aa Date: 2007-03-08T16:13:32+09:00 Subject: post_form Dear all, I'm a newbie and have been looking for a solution regarding the following issue: I'm trying to get the results from the page http://daftarj.spr.gov.my/daftarbi.asp and looking at the source of the page I have the following information:
. . . . .
There is no query string such as ...asp?id=blabla&something=blabla, so I need to simply pass the value I wish to post such as "0000059" into that hidden field and get the results? Is this possible? I have tried a simple code and it didn't work: require 'net/http' require 'uri' res = Net::HTTP.post_form URI.parse('http://daftarj.spr.gov.my/daftarbi.asp'),{"txtSub" => "0000059"} case res when Net::HTTPSuccess, Net::HTTPRedirection puts res.body else res.error! end Kindly correct me If I'm wrong Appreciate any help regards -- Posted via http://www.ruby-forum.com/.