Is there any way of taking a screenshot of a website in PHP, then saving it to a file?
Yes. You will need some things tho:
See khtmld(aemon) on *nx. See Url2Jpg for Windows but since it is dotNet app you should also chek Url2Bmp
Both are console tools that u can utilise from your web app to get the screenshot.
There are also web services that offer it. Check this out for example.
Edit:
This link is useful to.