Skip to content

Instantly share code, notes, and snippets.

@tobi
Created November 30, 2008 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobi/30546 to your computer and use it in GitHub Desktop.
Save tobi/30546 to your computer and use it in GitHub Desktop.
<?PHP
function compute_key_for_src($src) {
// Replace with your API key
return md5('<YOUR API KEY>'.$src)
}
function screenshot_of($src) {
// Replace with the url to the profile that will take the screenshot
return 'http://www.web2png.com/s/123/frontpage.png?src=$src&key='. compute_key_for_src($src);
}
?>
<img src="<?PHP echo(screenshot_of('http://www.cnn.com')) ?>" width="" height="" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment