shanil — 2013-01-12T06:14:11-05:00 — #1
I would like to take the screenshot of the website page using a php script. What I'm expecting is a command where I can provide the URL, and it will create a screenshot in png or jpg format.
f.e php takescreenshot.php <url> <output_file> .
If anyone knows please help me.
Thanks in advance
adolek17 — 2013-01-12T08:25:14-05:00 — #2
shanil — 2013-01-14T01:56:59-05:00 — #3
Thank you for your reply.
Is there any other way to take the screen shot using php in Linux ?
rubble — 2013-01-14T07:32:56-05:00 — #4
I think you can do it with Imagemagick but you need an x-server whatever that is.
There is a post on the Imagemagick forum and there may be others around.
system — 2013-01-14T08:19:12-05:00 — #5
I think it means you need a server with a windowing environment (so not just command line). You need a server somewhere that actually runs the site in a web browser so that an image can be saved and you can then grab the image.
I did this exact same thing about 4 years ago, and that's pretty much the process we had to go through.
rubble — 2013-01-14T10:22:00-05:00 — #6
I think it means you need a server with a windowing environment (so not just command line).
You could be correct as there is a way of doing it in windows which opens a browser window; which I mentioned in the link in my post.
eastcoast — 2013-01-14T18:07:49-05:00 — #7
You can do it with wkhtmltoimage which is a command line application that uses the webkit engine