Skip to content

Instantly share code, notes, and snippets.

@mdp
Created July 1, 2009 23:21
Show Gist options
  • Save mdp/139148 to your computer and use it in GitHub Desktop.
Save mdp/139148 to your computer and use it in GitHub Desktop.
Log to Google Spreadsheet
require 'net/http'
require 'uri'
require 'cgi'
def log2spreadsheet(application, message)
formkey = "ck9iWFJsVzdRQlpSUXRwbkpmSWttdGc6MA.."
application = CGI.escape(application)
message = CGI.escape(message)
Net::HTTP.get(URI.parse(
"http://spreadsheets.google.com/a/mpercival.com/formResponse?formkey=#{formkey}&entry.1.single=#{application}&entry.2.single=#{message}"))
end
log2spreadsheet('SomeOtherApp', 'New paid user signed up - [email protected]')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment