Skip to content

Instantly share code, notes, and snippets.

@dtolj
Created August 13, 2009 18:30
Show Gist options
  • Save dtolj/167364 to your computer and use it in GitHub Desktop.
Save dtolj/167364 to your computer and use it in GitHub Desktop.
#!/usr/local/bin/ruby
require 'uri'
require 'net/http'
require 'open-uri'
uri=URI.parse('http://www.google.ca/')
test=Net::HTTP.post_form(uri,
{"q"=>"MYLONGSEARCH"})
puts test.body
fh=File.new("./me.html","w")
fh.write(test.body)
fh.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment