aking screenshos of websites is not a frequent requirement for developers but can come handy on many occasions. Although there are some nice solutions on the web, a particular one I found very good is wkhtmltoimage. wkhtmltoimage is a simple shell utility which can be used to convert html to images using the webkit rendering engine, and qt.
He includes some brief instructions of how to get the tool installed and how to run it (via the command line first) to grab a screenshot of the bbc.com site. To use it in PHP, he suggests either using it in a shell_exec type of function or by using the snappy wrapper that handles some of the interfacing with wkhtmltoimage for you.