imagegrabwindow() and imagegrabscreen()
Posted on July 13, 2007
I stumbled over these two new functions in the PHP CVS today. They are only available in Windows as they use COM, but interesting non the least.
imagegrabwindow — Captures a window
resource imagegrabwindow ( int $window [, int $client_area] )
Grabs a window or its client area using a windows handle (HWND property in COM instance)
imagegrabscreen — Captures the whole screen
resource imagegrabscreen ( void )
Grabs a screenshot of the whole screen.
See the manual pages for examples.
Update: Pierre discusses it on his blog aswell.
Related posts
- Idiot Proof Lightbox
I've just made some modifications to my Gallery code which is part of i9000's small... - Upgrading from SQL 2000 to 2005 Error -1
Ever had your Upgrade Advisor return an error while upgrading an instance of SQL Server... - MySQL Tuning Server Parameters
These are some of the handy MySQL 5.0 tweaks I do to get the most... - Synchronizing time on a Windows 2003 domain controller
In a Windows domain environment its incredibly important that all clients & servers share the... - Problems installing System Center Essentials 2010
So, I spent 16 irreplaceable hours of my life trying to install System Center Essentials...



January 22nd, 2008 - 12:47
Hi!
The functions do not use COM, only my examples as it is one of the only way to actually control an application on Windows from a standard PHP install
The functions use the win32 API to fetch the bitmap of a given window or screen.
March 5th, 2012 - 01:36
imagegrabwindow uses COM
March 5th, 2012 - 01:38
That is correct! Well done!