imagegrabscreen

(PHP 5 >= 5.2.2, PHP 7)
Captures the whole screen
resource imagegrabscreen ( void )

Grabs a screenshot of the whole screen.

Returns:

Returns an image resource identifier on success, FALSE on failure.

Notes:

This function is only available on Windows.

Examples:
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");
imagedestroy($im);
?>

See also:

imagegrabwindow() -

doc_php
2016-02-24 15:59:48
Comments
Leave a Comment

Please login to continue.