2

Possible Duplicate:
Website screenshots using PHP

I want to create a script that will show the thumbnail of a site (let's say 400*300px ). I don't want sites like www.bitpixels.com .

So the answear could come in 2 ways:
1) You explain how could I take the screenshot of a website (using only PHP,ajax, etc,... no .NET or other stuff like that :D )

2) You know a website that offers this type of service for free and there's no limitation in the number of thumbs you can get, or their size.

Community
  • 1
  • 1
XCS
  • 27,244
  • 26
  • 101
  • 151
  • This has been answered already: See http://stackoverflow.com/search?q=php+screenshot – Pekka Jan 29 '11 at 18:07
  • This seems kinda' overwhelming for the server... Maybe it's worth paying that extra 5$ for a thumbnailing service? :-/ – XCS Jan 29 '11 at 18:14

1 Answers1

2

You may want to try wkhtmltopdf (webkit-based html to pdf conversion), it also contains wkhtmltoimage, a version of it that outputs images. It's open source and if you have any sort of dedicated machine you should be able to use it. Otherwise I am not sure. Since it is webkit based it should provide you with a decent rendering of the page too.

Another great tool for this is PhantomJS

Seldaek
  • 40,986
  • 9
  • 97
  • 77
  • No, I have a shared hosting, can't install this plugins :D . But thanks for the answear – XCS Jan 29 '11 at 18:12
  • You could get yourself a virtual server or something, there are affordable ones. – Seldaek Jan 29 '11 at 18:16
  • We'll see. I'm just starting a project, but I think I'll only need a VPS in 6-7months or so. I'll stick to the thumbnailing services till then :D. – XCS Jan 29 '11 at 18:21
  • Thanks Seldaek, yes `wkhtmltoimage http://google.com google.png` worked for images – Caruso33 Jun 06 '22 at 11:08