Duplicate:
website screenshots using php
Is it possible to take a screenshot of the current page using PHP?
You could install webkit2png on your server and then execute webkit2png http://yourpage.example.com from your PHP script. That will give you a screenshot the way Webkit renders the page. For installing on Linux, see this.
webkit2png http://yourpage.example.com