Here is the code I'm using:
<?php
$im = imagegrabscreen();
imagepng($im, "C:/pathtofile/image.png");
imagedestroy($im);
The images get saved but when I open them, they are just black. I'm using Apache for my server, I already enabled "Allow services to interact with desktop" in services. I have also tried using jpg instead of png. Everything just results in a black image. I have also tried with this header: header('Content-type: image/png');
but that doesn't make any difference.
Anyone have any suggestions?