复制代码 代码如下:<?php* 屏幕快照$im = imagegrabscreen();imagepng($im, “myscreenshot.png”); * 抓取一个窗口(IE为例) $browser = new COM(“InternetExplorer.Application”);$handle = $browser->HWND;$browser->Visible = true;$im = imagegrabwindow($handle);$browser->Quit();imagepng($im, “iesnap.png”);$im = imagegrabscreen();