<?php
$browser = new COM("InternetExplorer.Application");
$handle = $browser->HWND;
$browser->Visible = true;
$browser->Fullscreen = true;
$browser->Navigate("
http://www.phpshao.cn");
/* Still working? */
while ($browser->Busy) {
com_message_pump(4000);
}
$im = imagegrabwindow($handle, 0);
$browser->Quit();
//imagejpeg($im, "tmp.jpg");
//$old_img=imagecreatefromjpeg("tmp.jpg");
$new_img = imagecreatetruecolor(200,150);
imagecopyresampled($new_img,$im,0,0,0,0,200,150,1024,768);
imagejpeg($new_img , 'image/'.time().'.jpg',100);
imagedestroy($new_img);
?>
运行环境php5.2以上打开gd2,截本站的效果图。

出处:http://www.phpshao.cn/html/PHPdaimaku/20071230/8669.html