Don't mean to revive a dead thread but figured this could be useful to someone who is looking to automate screen shots in PHP.
The only thing is that this script has to be run on a windows machine as it uses COM objects to open and close Internet Explorer.
<?php
$browser = new COM("InternetExplorer.Application");
$handle = $browser->HWND;
$browser->Visible = true;
$browser->Fullscreen = true;
$browser->Navigate("http://www.google.com");
/* Still working? */
while ($browser->Busy) {
com_message_pump(4000);
}
$im = imagegrabwindow($handle, 0);
$browser->Quit();
imagepng($im, "google_screenshot.png");
imagedestroy($im);
?>