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

37,851

Solution 1

You can start a session at http://browsershots.org . If you know how to do with cronjob it can be started at anytime I think.

Solution 2

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.

Solution 3

You can use webcapture. A simple script using webkit and Qt.

http://labs.trolltech.com/blogs/2009/01/15/capturing-web-pages/

Solution 4

A few months ago i had to do something similar and I found three small programs.

In Windows you can use an open source tool called IEcapt

Usage from the command line:

iecapt --url=http://www.google.com/ --out=localfile.png

In Linux you can use html2jpg or Webthumb.

I used IEcapt and worked fine for me.

Solution 5

You can use Wimg.ca, here is an example.

Share:
37,851
Handsome Nerd
Author by

Handsome Nerd

Updated on September 17, 2022

Comments