关于如何将网页呈现给服务器上的图像的简单示例[重复]

Possible Duplicate:
Website screenshots using PHP

I cannot seem to find a simple example of how to render a webpage to an image via a web server.

Right now I have a backend running Nginx and serving a PHP app, I also have a reverse Proxy serving Node on the same backend.

What I need to achieve is an API to which I can hand a URL and have it rendered as a PNG then stock somewhere on the hard drive. (If this whole process could be asynchronous that would be perfect.)

What would be the best approach to achieve this?

You will need a renderer, which I don't think is available in a simple PHP library. You could use the engine of Google Chrome, which is open source and has a reasonably usable API to embed it in other applications. I'm not sure how, but you should be able to make it render to an image, or to a canvas from which you can save it yourself.

Not an easy solution, though. Rendering a website is immensely complex.