Need to know of capturing screenshot on server side.

Asked By 20 points N/A Posted on -
qa-featured

Hi Experts, I need to capture screenshot from an window over server side. Now I am using PHP to make web server. How to do this? Please leave a command.

 

SHARE
Answered By 10 points N/A #198253

Need to know of capturing screenshot on server side.

qa-featured

 

Hi Eliza Dunley,

To capture screenshot from a window over server side, you can use a script that will grab the screen and save it as PNG. The Bash script is:

#!/bin/bash firefox $1 #Start firefox and go to the passed in URL scrot –d 5 test.png # Take screen grab with 5 second delay

The PHP code that is used to run the script is:

<? //Sample URL $url=’http: //www.google.com’; // Run the script shell_exec (‘sh script.sh’. $url); // Out put HTML to display image echo ‘<img scr =”test.png” />’ ;?>

 

 

Related Questions