-2

Possible Duplicates:
Convert URL to screenshot (script).
PHP: How to capture browser window screen with php?

I have a URL and I want to convert that webpage screenshot to an image. Please let me know if we can do this using php or some other tools that can be used with PHP/Linux.

Community
  • 1
  • 1
Crd007
  • 473
  • 1
  • 7
  • 16
  • Another possible duplicate: [Generate image from html with php](http://stackoverflow.com/questions/6702986/generate-image-from-html-with-php) – hakre Aug 05 '11 at 10:42

2 Answers2

0

This isn't the best solution, but you could convert the HTML page to a PDF, then use imagemagick to convert the pdf to a jpeg using this command exec("convert sample.pdf sample.jpeg"). To convert HTML to pdf, see this question.

Convert HTML + CSS to PDF with PHP?

Community
  • 1
  • 1
Zoidberg
  • 10,137
  • 2
  • 31
  • 53
  • I would look at Gordon's comment, if that is what your trying to do, the question he is showing is a MUCH more ideal solution than this one. – Zoidberg Jun 14 '11 at 10:33
0

The shutter screenshot tool is able to do that.

It's in the menu: File -> New -> Web

Can be used with Linux and PHP on the same system. See the manpage for commandline options to be invoked from PHP.

hakre
  • 193,403
  • 52
  • 435
  • 836