So, I figured it out. I ended up doing this in Perl since the W32 api functions in PHP are unmaintained and buggy. But you can do this by using the keybd_event() function from user32.dll. The numerical code for a print screen is 0x2C.
Here's the source in Perl. Should be easy to translate to PHP.
use Win32::API;
$keybd_event = new Win32::API('user32', 'keybd_event', 'IIII', 'V');
if(not defined $keybd_event) {
die "Can't import API keybd_event: $!\n";
} else {
$keybd_event->Call(0x2C,0x45,KEYEVENTF_EXTENDEDKEY | 0,0);
$keybd_event->Call(0x2C,0x45,KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,0);
}
This'll get a screencap of the running process' desktop. Now you just gotta extract it from the clipbaord. 😉