0

I want to know is it possible to take the the screen shot of webpage/url entered and get the response as .jpg/.png etc.

Here what I am specifically looking for is getting screen shots for different browsers i.e. the web page look on IE,FF,Safari etc.

Browser can be given as input at the time of giving the url.

Regards

Deepak

Oliver A.
  • 2,870
  • 2
  • 19
  • 21
ʞɹᴉʞ ǝʌɐp
  • 5,350
  • 8
  • 39
  • 65
  • PHP is a web-server, not web-browser. Go figure – Your Common Sense Jan 17 '11 at 08:08
  • Also, this stackoverflowed site is an excellent source of knowledge for ones who wants to know something. Just use search – Your Common Sense Jan 17 '11 at 08:09
  • Is this for testing purposes or for some other strange purpose? If it's for testing you can just use something like browserlabs or a similar tool, but if you for some reason need it automated you'll have a lot more work ahead;) – Sondre Jan 17 '11 at 08:10

3 Answers3

0

This can't be done with just plain old PHP(almost certain).

<?php

take_screenshot("firefox") #can't be done

There is this function named imagegrabscreen() available for windows only. This SO-topic also has some more information about this.

You could offcourse use webservices which take screenshots for you like for example:

Community
  • 1
  • 1
Alfred
  • 60,935
  • 33
  • 147
  • 186
0

SeleniumRC has facilities to take screen shots and can be run against pretty much any browser and any of the supported languages which include PHP.

edovale
  • 41
  • 5
-1

To make Screenshots of different browsers you must have an server. With php alone is not possible. Here an online Webservice: http://browsershots.org/ - Look to the Site: XML-RPC Methods

Phillip Plum
  • 537
  • 4
  • 14