Skip to content

Instantly share code, notes, and snippets.

@tobi
Created November 30, 2008 22:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobi/30547 to your computer and use it in GitHub Desktop.
Save tobi/30547 to your computer and use it in GitHub Desktop.
require 'digest/md5'
def compute_key_for_src(src)
Digest::MD5.hexdigest('<YOUR API KEY>' + src)
end
def screenshot_of(src)
"http://www.web2png.com/s/123/frontpage.png?src=#{src}&key=#{compute_key_for_src(src}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment