views:

215

answers:

4

I need to get a "thumbnail" of a web page which I know the url and save it to a file.

At the moment i'm stuck at "conversion" from html to image: i can get the html via curl.

How can i do to achieve this in php? It's possible?

+1  A: 

That means you'll have to completely render the page from the retrieved HTML - which is, expressed lightly, not easy. Far from it. There are some services that can do web-based rendering for you, but I do not really think this is what you are looking for... Still, have a look at this.

JorenB
+2  A: 

You could use Firefox or XULRunner as answered here

jjclarkson
A: 

I tried HTML2Image which looked to work great, but it's not free. But, it works on *nix platform.

Boris Guéry
+2  A: 

A friend of mine used webkit2png, but he said that would he ever do it again, he would probably prefer tools from browsershots.org

nikc