Home » Questions » Computers [ Ask a new question ]

How can I automatically take a screenshot of a website at a specified time? [closed]

How can I automatically take a screenshot of a website at a specified time? [closed]

I need to take a screenshot of a website automatically at a time specified by me. Ideally it would not be using my computer since it's not guaranteed to be on at the specified time.

Asked by: Guest | Views: 251
Total answers/comments: 4
Guest [Entry]

"You could look at this blog entry describing how to make a screenshot

As you see there is a php script which grabs the screenshot:

<?php

// save this snippet as url_to_png.php
// usage: php url_to_png.php http://example.com
if (!isset($argv[1])){
die(""specify site: e.g. http://example.com\n"");
}

$md5 = md5($argv[1]);
$command = ""wkhtmltopdf $argv[1] $md5.pdf"";
exec($command, $output, $ret);
if ($ret) {
echo ""error fetching screen dump\n"";
die;
}

$command = ""convert $md5.pdf -append $md5.png"";
exec($command, $output, $ret);
if ($ret){
echo ""Error converting\n"";
die;
}

echo ""Conversion compleated: $argv[1] converted to $md5.png\n"";

However you'll need imagemagick and wkhtmltopdf:

sudo aptitude install imagemagick wkhtmltopdf

It should not take much imagination to setup a cron job which uses this script and then saves it to a folder."
Guest [Entry]

"This article Website Thumbnail Creators (Website Snapshot Generators) discusses the several ways of achieving this goal. For example, it points to:

Free PHP Scripts :: Website Thumbnail Generator

Website Thumb Generator can be used to
create website thumbnails for your
needs, or start your own website
thumbnail generation service.

Requirements:


Windows hosting
PHP GD library (installed on most hostings)
Permissions to execute third-party applications (i.e. exe files)
Permissions to execute Internet Explorer


How it works:


Website Thumbnail Generator checks if it already has website image in
the cache, and shows it in the
browser.
If no cached image then IECapt would be run from the script.
IECapt would run Internet Explorer, grab full sized website screenshot
from it, and save image into the
folder you specified in script
settings.
Then Website Thumbnail Generator would resize image, and show it in
the browser."
Guest [Entry]

"iMacros for Firefox can be used to take full page web browser screenshots: http://wiki.imacros.net/Browser_Automation#Web_Site_Screenshot

Start it via the task scheduler and command line: http://wiki.imacros.net/iMacros_for_Firefox#Command_Line_Support"
Guest [Entry]

You can try Webcron + a screenshot service like Browshot with their PHP library. You would also have to same/upload your screenshot somwhere, S3 for example.