I am wanting to grab a screenshot using PHP and on my local Vista machine. For starters I just wanted to get the standard example set up:
$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");
imagedestroy($im);
Ben script (komut satırı) çalıştırdığınızda, iki IE pencereleri açılır. Bir (ilk) boş kalır ve ikinci belirlenen URL'ye gider. Ekran görüntüsü, alınan kaydedilir ve ilk pencere kapalı alır edilir. URL gitti penceresi açık kalır. Ilk, boş IE penceresinden alınan ekran görüntüsü kendisi.
Nasıl ikinci pencereyi hedef olabilir?
-- EDIT #1 -- After all the help from Breakthrough it still does not work on my system. :( For now I am going to try to work it out with: http://iecapt.sourceforge.net/ or http://cutycapt.sourceforge.net/ which both seem to work during preliminary testing. I am still interested in a "real" PHP solution.