12-05-2007, 07:46 PM
|
#3 (permalink)
|
|
The Addict
Join Date: Nov 2007
Location: UK
Posts: 296
Thanks: 18
|
Yes i have been trying to figure out how to take screenshots of websites. I found out about the screengrab functions PHP has to offer well the latest version. I cant manage to get them to work maybe you can enlighten me on the subject?
PHP Code:
imagegrabscreen();
imagegrabwindow();
PHP Code:
<?php
$im = imagegrabscreen();
imagepng($im, "myscreenshot.png");
?>
PHP Code:
<?php
$browser = new COM("InternetExplorer.Application");
$handle = $browser->HWND;
$browser->Visible = true;
$browser->Navigate("http://www.libgd.org");
/* Still working? */
while ($browser->Busy) {
com_message_pump(4000);
}
$im = imagegrabwindow($handle, 0);
$browser->Quit();
imagepng($im, "iesnap.png");
?>
|
|
|