Is there any way of taking a screenshot of a website in PHP, then saving it to a file?
This ought to be good for you:
https://wkhtmltopdf.org/
Make sure you download the wkhtmltoimage distribution!