Skip to content

Instantly share code, notes, and snippets.

<?php
function screenshot_url($url) {
$token = md5($url . $secret);
$img = "http://api.screenshotshark.com/$key/$token/png/?url=" . urlencode($url);
}
?>
<img src='<?php echo screenshot_url("http://news.google.com") ?>' />
@mikejholly
mikejholly / gist:3724921
Created September 14, 2012 21:19
PHP Recursion Fun
<?php
$a = array(
'foo' => array(
'bar' => array(
'baz' => 'foo',
'bar' => array(
'loo' => 'poo'
),
),
@mikejholly
mikejholly / Common Grammer
Created December 31, 2011 18:48
TextMate whitespace include
{ scopeName = 'source';
patterns = (
{ name = 'source.invalid.trailing-whitespace';
match = '(\s*$)?';
captures = { 1 = { name = 'invalid.trailing-whitespace'; }; };
},
);
}