This is a demo of the "take screenshot" service built into the Google Speed Test API Services.
To use it just put the PHP script somewhere available on a webserver and go to [thaturl]/?link=https://example.org/
Use whatever link you like instead of example.org, and the page will render as a screenshot of that website.
This script does not rely on any other extra libraries (like curl, GD etc.)