很明显的问题是,php属于服务器语言,当你打开网页的时候,php程序已经运行完成.就不可能在执行一个程序了.
如果想php进行截图的话,试试flash.
$browser = new COM("InternetExplorer.Application");
$handle = $browser->HWND;
$browser->Visible = true;
$browser->Width = 500;
$browser->Height = 500;
$browser->Fullscreen = true;
$browser->Navigate("http://www.google.fr");
/* Still working? */
/*
while ($browser->Busy) {
com_message_pump(4000);
}
$im = imagegrabwindow($handle, 0);
$browser->Quit();
imagepng($im, "iesnap.png");