For this to work your Apache service must be set to 'Allow service to interact with desktop' otherwise you will just get a blank image. To fix this right-click My Computer, select Manage/Services and Applications/Services - find the apache service (like Apache2) and right-click, select Properties - choose the Log on tab and check the 'Allow service to interact with desktop' checkbox. Restart Apache.
imagegrabscreen
(PHP 5 >= 5.2.2)
imagegrabscreen — Captures the whole screen
Description
resource imagegrabscreen
( void
)
Grabs a screenshot of the whole screen.
Return Values
Returns an image resource identifier on success, FALSE on failure.
Examples
Example #1 imagegrabscreen() example
This example demonstrates how to take a screenshot of the current screen and save it as a png image.
<?php
$im = imagegrabscreen();
imagepng($im, "myscreenshot.png");
?>
Notes
Note: This function is only available on Windows.
imagegrabscreen
andrew at local dot co dot nz
19-Apr-2008 12:02
19-Apr-2008 12:02
