Anton Kihlström Anton Kihlström - 1 year ago 115
PHP Question

How to screenshot a webpage in php?

I am currently making a website where simply I want users to be able to screenshot a webpage and then download the image.
So what I need help with is how to screenshot a webpage using php and then save the image on my server.

I have read a few other topics about how to screenshot a page but I can't get it to work.

I am using a linux server (Debian 7.0)

Thanks for help :D

Answer Source

You can use

Take Website Screenshots with PHP

  1. Get your free Application Key and Secret.
  2. Download the free PHP Demo and Library and try it out.

Then use it like this:

$grabzIt = new GrabzItClient("APPLICATION KEY", "APPLICATION SECRET");

If you don't want to depend on 3rd parties, you can use phantomjs, i.e.:

phantomjs responsive-screenshot.js


1- Download responsive-screenshot.js. Check the source code for available options.

2- You can install phantomjs by cloning the github repo:

git clone
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download