Is there any way of taking a screenshot of a website in PHP, then saving it to a file?
Since PHP 5.2.2 it is possible, to capture a website with PHP solely!
imagegrabscreen — Captures the whole screen
imagegrabwindow - Grabs a window or its client area using a windows handle (HWND property in COM instance)
HWND;
$Browser->Visible = true;
$Browser->Fullscreen = true;
$Browser->Navigate('http://www.stackoverflow.com');
while($Browser->Busy){
com_message_pump(4000);
}
$img = imagegrabwindow($Browserhandle, 0);
$Browser->Quit();
imagepng($img, 'screenshot.png');
?>
Edit: Note, these functions are available on Windows systems ONLY!