views:

459

answers:

3

i've tried searching everywhere but there's seems to be no implementation available other than having the client use a file (batch/exe of some sort).

+7  A: 

You just can't do it. PHP is server side scripting language, maybe you can do that using JavaScript, but I'm not even sure about that.

I know someone implemented such service, but actually he had to use Mozilla browser, which opened, a script (I think it was not JS, maybe perl, c/c++) made a screenshot and uploaded it.

usoban
What I'd like to do is something like: I have a page with tables and some buttons. Now if in case the user of my page sees a bug and wants to report it, he/she can click a button or link which takes a snapshot of what's active on his browser.. and may be upload or send it to me... but technically as you have posted, may be this function requires more than using php alone
Oh, you want to make users screenshot ... that's even harder. In my answer, I assumed you want your server to create a screenshot of a site. Well, either way, it's not possible to do that using PHP.
usoban
+1  A: 

I'm assuming you mean "your" in the general sense. If you mean "how does one take a screenshot...", you generally hit the print screen key. If you're trying to capture your users' browser output, I'd say that it's probably not possible. If it were, the best you could get is the output of what you wrote yourself.

Google Gears might be hackable to do something close, if you can simulate the print screen key press with JS and get the file to save somewhere gears can access.

Shadow
A: 

Hi,

You can't do that in PHP, as PHP is running on the server, and not the client.

To get screenshots of the browser, you can take a look at, for instance, this list.

If you are look for an automated solution to take screenshot of web pages opened in a browser window, you could also look at this question : How to capture x screen using PHP, shell_exe and scrot and it's answers.

And, finally, and without selecting any particular post, you can try a search on SO ; something like screenshot browser, sorted by relevance, seems to get some interesting posts :-)

Good luck !

Pascal MARTIN