I am using the code
<?php
echo 'Hi';
$im = imagegrabscreen();
imagejpeg($im, "myscreenshot.jpg");
imagedestroy($im);
?>
This is creating a image myscreenshot.jpg with black background.But Iam expecting a jpeg image with white background and hi written on it
This is a common problem see ans you are getting this error because Apache is not allowed to interact with your desktop (Note)
Solution 1 : Apache Permission :
services.mscas Admin.Allow this service to interact with the desktop.Solution 2 : us using “boxcutter”
Solution 3 : Using COM seee ( http://php.net/manual/en/function.imagegrabwindow.php )
I hope this helps