Is there any way of taking a screenshot of a website in PHP, then saving it to a file?
Not directly. Software such as Selenium have features like this and can be controlled by PHP but have other dependencys (such as running their java-based server on the computer with the browser you want to screenshot)