Below is the code that I am using to grab the screen shot of the entire webpage.
reference stackoverflow link (Website screenshots using PHP)
When I run this script from browser, All I get is a blank black image and not the screen shot of the webpage. Any help is greatly appreciated. Thanks!
<?php
header('Content-Type: image/jpeg');
$Browser = new COM('InternetExplorer.Application');
$Browserhandle = $Browser->HWND;
$Browser->Visible = true;
$Browser->Fullscreen = true;
$Browser->Navigate('http://google.com');
while($Browser->Busy){
com_message_pump(4000);
}
$img = imagegrabwindow($Browserhandle, 0);
$Browser->Quit();
imagejpeg($img, 'screenshot3.jpg');
?>