Is it possible to 'snag' a web page image in PHP?
What I me开发者_开发知识库an is to get the rendered HTML and make a Jpeg/GIF out of it. The idea is to make a digital snapshot of a page.
It will probably require far more effort than it is worth. Why not look at services that already provide this for you? (Like Alexa)
You cannot do that in PHP only ; but, from PHP, you can start a browser, indicating it that it has to load the URL you want, and, then, get a "screenshot" from that browser.
I've heard a couple of time of Firefox being able to do that -- should be a couple of questions+answers here on SO that should help you get started ; here are a couple of those :
- Command line program to create website screenshots (on Linux)
- PHP: How to capture browser window screen with php?
- Is there a way to automatically take a screenshot of a website through a URL?
How about HTML to a PDF? Many libraries available. And PDF's can in turn converted to Image?
That can be done right? Or am I way off?
精彩评论