kieranbarnes do you know where your towel is?

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.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay

Related posts:

  1. Idiot Proof Lightbox
    I've just made some modifications to my Gallery code which is part of i9000's small...
  2. How to move Wordpress directory or server – properly
    I ran into an annoying, but easily avoided problem the other day. When moving a...
  3. Estelle’s Mod Store
    I've recently had the pleasure of dealing with Estelle Winterflood, owner of Estelle's Mod Store....
  4. Synchronizing time on a Windows 2003 domain controller
    In a Windows domain environment its incredibly important that all clients & servers share the...
  5. Auto Updating GeoIP Binary Databases
    Here's how I keep on top of updating the GeoIP binary databases used by various...

What this article useful to you?



Let me know, buy me a beer!
Alternatively, if you're feeling impecunious, you may like to subscribe to my RSS feed, or see other articles in the PHP category.

Filed under: PHP Leave a comment
Comments (1) Trackbacks (0)
  1. 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.


Leave a comment


No trackbacks yet.