Capture a window (IE for example) but with its content in PHP

Description

The following code shows how to capture a window (IE for example) but with its content.

Example


//  ww  w .ja  va 2 s.com


<?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, "test.png");
imagedestroy($im);
?>




















Home »
  PHP Tutorial »
    Image »




Color
Create
Font
Operation
Shape
Text