I want to take screenshot of any website which I want through php and save that image file. I will just enter website name and I need screenshot of that page in an image. Is there any API that I can use or Is there any simpler way to do it in PHP. Please help me out. Thanks in advance. I want to do similar to what http://goo.gl does. If I enter any url there, It gives preview of that website on right.
Asked
Active
Viewed 549 times
-1
-
Screenshots imply you're viewing the website in a graphical interface of some kind... Are you talking about making a GUI program in PHP? PHP can download the web-resources, but it doesn't natively know how to render them in any graphical representation. – EthanB Mar 08 '14 at 18:59
1 Answers
1
I don't know about your hosting situation but if you have sufficient control over the server you could use wkhtmltopdf. It's a tool that uses the webkit engine to render HTML pages to a PDF or an image. You'd have to use system calls from within PHP to use it. I've only ever used it to create PDF versions of reports but it seems to work okay.

Rick
- 66
- 3