PHP: How to capture browser window screen with php?

There is imagegrabscreen() and imagegrabwindow(), which would allow you to programmatically create screenshots from a browser running on the same machine via COM (Win only though). See the comments in the manual for how to omit the browser’s chrome. With DCOM enabled, this would also work with remote windows machines that have been setup to allow access through DCOM.

On a sidenote for those that said PHP does not know about the browser, I’d suggest a look at get_browser() in the PHP manual. It’s not much, but hey, it’s not nothing.

Leave a Comment