<?php
//This is example of getting and saving website screenshot.
//This example requires webthumbnail class. Visit http://api.webthumbnail.org for more information.
if ($_GET['url']=='') die('Type &/?url=websiteUrl at the end of address bar to make website screenshot.');
include_once('glowFoto.class.php');
include_once('webthumbnail.class.php'); // <-- http://www.phpclasses.org/package/7479-PHP-Capture-a-screenshot-of-a-page-using-WebThumbnail.html
set_time_limit(300); // It may take some time, as webthumbnail.org can be simetimes slow
$thumb = new Webthumbnail($_GET['url']);
$response = $thumb->capture()->getResponse(); //wait till capture is ready...
$glowFoto = new GlowFotoAPI();
$glowFoto->setThumbSize(GlowFotoAPI::THUMB_SIZE_400);
$URLs=$glowFoto->fastSendFromPOSTOrFileContent($response);
echo 'READY!<br><center>'.$URLs['HTML'].'</center>';
?>
|