5

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.

Is there some kind of web service that does this? Or some (free) hosting site where I could set up a script to do it (PHP comes to mind)? I do have a jailbreaked iPhone that could be used as well (jailbreaked = I have root access and could maybe do some cron magic).

2

10 Answers 10

2

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.

2

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

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

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.

1

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

1

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.

0

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.
0

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

0

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.

0

I have used GrabzIt before for this kind of job they provide a simple to use PHP library. To use it you would need to do something along the lines of:

include("GrabzItClient.class.php");
$grabzIt = new GrabzItClient();
$id = $grabzIt->TakePicture("http://www.google.com");

//wait a certain amount of time and retrieve the screenshot

$result = $grabzIt->GetPicture($id); 

if (!$result){ return;}
file_put_contents("images/test.jpg", $result);
0

Would definitely recommend using an existing service rather than coding a new one. I use http://www.websnaps.co

They provide and excellent screen capture service and you can setup up automatic capture schedules too. And you can pin the screenshots to pinterest pretty easily too.

Not the answer you're looking for? Browse other questions tagged or ask your own question.