Is there any way of taking a screenshot of a website in PHP, then saving it to a file?
It all depends on how you wish to take the screenshot.
You could do this via PHP, using a webservice to get the image for you
grabz.it has a webservice to do just this, here's an article showing a simple example of using the service.
http://www.phpbuilder.com/articles/news-reviews/miscellaneous/capture-screenshots-in-php-with-grabzit-120524022959.html