7

Alright all,

Been doing a bit of research and want to know if anyone else has tried this... and what approach would you take.

I'm planning on doing a website which will display a screenshot of a website (maybe based on the url in someones email address).

There's going to be alot of people getting this so, pre-production of the screenshots isn't a solution.

Soooooo... does anyone know of any solutions:

  1. Thumbnail service that builds on demand (no queuing)?
  2. HTML5/Canvas script that will let me do this. I've found one but it won't run cross site.
  3. Any other solution?

It'll be built in PHP.

Thanks

PVS.

Von Schmytt
  • 463
  • 2
  • 6
  • 15
  • http://stackoverflow.com/questions/757675/website-screenshots-using-php – James Nov 14 '11 at 14:46
  • 1
    Is your question any different from the one mentioned by James, or any of these http://stackoverflow.com/questions/tagged/php+screenshot?sort=votes&pagesize=50 ? How does HTML/Canvas fit into PHP? AFAIK you still need to launch a real browser to take an accurate screenshot. – Mike B Nov 14 '11 at 14:58
  • Mike... Yes it is different as I was asking about HTML5/Canvas solutions not just PHP on it's own. To answer your question HTML/Canvas doesn't fit into PHP. I mentioned PHP so people know what technology I will be developing the system. Probably should have explained that further. Didn't want to waste the time of people if they knew of something which would work in .NET. Thank you for the info about a real browser. – Von Schmytt Nov 15 '11 at 13:20

4 Answers4

1

This site http://html2canvas.hertzen.com/ is the best you will get right now with regard to a client side script. It uses the calculated properties of elements to render a page, and I must say it looks good!

Update: A demo here: http://html2canvas.hertzen.com/tests/templates/projection/index.html . Click to toggle the 'real' view with the rendered image.

Willem Mulder
  • 12,974
  • 3
  • 37
  • 62
0

I've played about with wkhtmltoimage before, it was pretty good for what I was using it for, but does require you to install onto your server

Nick
  • 6,316
  • 2
  • 29
  • 47
0

For taking screenshots of websites (one of the features) i built a service ontop of the awesome PhantomJS which is an excellent headless browser which uses the webkit engine (same that safari uses). Although it's headless, it still has deps in QT and a virtual framebuffer (xvfb). Hope this helps: http://www.phantomjs.org/

smassey
  • 5,875
  • 24
  • 37
0

You can use html2canvas. More information here.

pradeek
  • 21,445
  • 2
  • 31
  • 32