javascript - How to take a screenshot of a web page and display it using PHP or JS?

one text

I am developing a website, actually in HTML, CSS, and Vanilla JavaScript.

On the site, I would like to display image captures of the current state of my others online creations.

I guess I'll have to use a server-side language to do it, So how to do it with JS using Nodejs or with PHP or is there another alternative?.

I would like to do something like this:

Source