Skip to content

Instantly share code, notes, and snippets.

View hklcf's full-sized avatar
🏠
Working from home

HKLCF hklcf

🏠
Working from home
View GitHub Profile
<?php
/**
* Get Google Page Speed Screenshot
*
* Uses Google's Page Speed API to generate a screenshot of a website.
* Returns the image as a base64 jpeg image tag
*
* Usage Example:
* echo getGooglePageSpeedScreenshot("http://ghost.org", 'class="thumbnail"');
*