Sounds crazy doesn’t it? What do PHP Screen Capture and Page Speed have in common? Well, nothing really, but these worlds met, because the original premise to do a tutorial about “screen capture in a web way” panned out to be only straightforward for Windows web server scenarios (ie. WAMP (for example EasyPHP … as per image today)), using PHP’s imagegrabscreen function. Am guessing, but suppose the history behind Windows having easier Screen Capture functionality is the Prnt-Scrn keyboard key that has been there since “the year dot” on Windows keyboards.
So, not resorting to third-party install solutions, on this occasion, what else is available out there, and the research led to this useful webpage (thanks) where one of the pieces of advice was to make use of Google’s (Web) Page Speed tester here where you get a “mock-up” of what the look of the www.rjmprogramming.com.au (ie. CentOS Linux, not Windows) webpage you are on would be on the Desktop, or as on a Mobile device. If disappointed (that you really wanted more), try some of those other third-party solutions mentioned at that link mentioned earlier. It is all very interesting though.
Back to the original premise, hope you know why PHP (or you could have picked other server-side languages, especially ASP.NET (Windows and server-side … perfect!)) was brought into the picture … there is an image that will, probably, need to end up being saved to a web server somewhere, so the server-side should be used … though, do you remember that Javascript method exception with the HTML canvas element mentioned in HTML/Javascript Canvas Image Copy Tutorial … curious, huh?
Here is some rudimentary PHP programming source code you could call MyScreenCapture.php (where you might notice the use of $_SERVER[‘SERVER_SOFTWARE’] to test whether you have a Windows Apache web server (ie. WAMP), as distinct from LAMP (you guessed it, Linux) or MAMP (right again, Mac)).
And here is a link to this blog posting tested for speed using Google’s (Web) Page Speed testing functionality.
If you have a serious need for this screen capture work, hope to get you thinking, at least, today. Or perhaps it got you thinking about some web page optimization you want help with (where the Google Page Speed tester may come into its own)?
If this was interesting you may be interested in this too.