<?php

function thumbalizr($url, $options = array()) {
	$embed_key = 'MY_EMBED_API_KEY'; # replace it with you Embed API key
	$secret = 'MY_SECRET'; # replace it with your Secret
	
	$query = 'url=' . urlencode($url);
	
	foreach($options as $key => $value) { 
		$query .= '&' . trim($key) . '=' . urlencode(trim($value)); 
		
	}
	
	
	$token = md5($query . $secret);
	

	return "https://api.thumbalizr.com/api/v1/embed/$embed_key/$token/?$query";
}


?>


<img src="<?php echo thumbalizr("https://browshot.com/", array('width' => 300, 'size' => 'page')); ?>" title="Screenshot done with Thumbalizr">
<img src="<?php echo thumbalizr("google.com"); ?>" title="Screenshot done with Thumbalizr">