Is it possible to "hook" a web page image in PHP?

What I mean is to get the rendered HTML and make a Jpeg / GIF from it. The idea is to take a digital snapshot of the page.

+2


a source to share


3 answers


How about HTML to PDF? There are many libraries available. And PDF, in turn, can be converted to Image?



Can this be done correctly? Or am I away?

+1


a source


This will likely require much more effort than it is worth. Why not take a look at the services that already provide this for you? (Like Alexa)



+1


a source


You cannot do this in PHP alone; but with PHP you can start a browser by telling it to load the url you want and then get a "screenshot" from that browser.

I've heard a couple of times Firefox could do this - there should be some questions + answers here on SO to get you started; here are a few of them:

+1


a source







All Articles