-3

I see there is a lot of info on how to save a websites to an image with PHP, however I cannot find any information on how to take a screen shot of a website using a specific width.

I want to take a screen shot using PHP of my websites in different widths, so I have screen shots of the design in different responsive modes (Desktop, Tablets, Phones).

Does anyone know how to save a url to an image with a specific width set, using PHP? (or with help from Javascript/jQuery for all I care)

Kevin M
  • 1,202
  • 15
  • 30
  • Instead of PHP you need more of Javascript to do that http://stackoverflow.com/questions/5621907/how-to-screenshot-website-in-javascript-client-side-how-google-did-it-no-nee – pavlovich Nov 29 '15 at 15:32
  • From what i read, the Javascript solution only lets me download the file client side and does not save it on to the server, I need the file on my server. – Kevin M Nov 29 '15 at 15:34
  • What is with the down votes on stackover flow these weeks. 3 seconds into the topic open and 3 automated down votes? No one can read that in 3 seconds what I wrote. And what is wrong with my question? – Kevin M Nov 29 '15 at 15:36
  • This might be helpful: http://phantomjs.org/screen-capture.html – Antti29 Nov 29 '15 at 15:50

1 Answers1

2

Since every one is so smart on Stackoverflow and just down votes for a question that has not been answered on Stackoverflow ever! Here is my solution to a perfectly valid question.

PHP cannot set the width of the website when taking a screen shot (using cUrl or copy), however using iFrame, you can create an iFrame, set the width of the iFrame and take a screen shot of that page.

Kevin M
  • 1,202
  • 15
  • 30