Skip to content

Instantly share code, notes, and snippets.

@cored
Created July 9, 2009 20:27
Show Gist options
  • Save cored/143971 to your computer and use it in GitHub Desktop.
Save cored/143971 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'sinatra'
require 'open-uri'
get '/' do
erb :index
end
get '/render' do
unless /^http:/ =~ params['url']
url = "http://"
else
url = ""
end
url += params['url']
open(url, "User-Agent" => "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment