0

We tried out to execute the following commands from php script to take print screen in Ubuntu, but it's not working. These commands are working properly in terminal but not through php script. Please give a solution to this..

shell_exec('gnome-screenshot -d 10');

shell_exec('import -window root image.jpg');

exec('gnome-screenshot -d 10');

exec('import -window root image.jpg');

Community
  • 1
  • 1
  • 1
    Possible duplicate of [Convert HTML to Image in PHP without shell](http://stackoverflow.com/questions/13039627/convert-html-to-image-in-php-without-shell) – GSerg Nov 26 '15 at 11:28
  • This would be an alternative way to do what the asked asked, but however the asker is looking to find out with exec and shell_exec will not work. – Daniel Nov 26 '15 at 11:29
  • @Stah Please see http://meta.stackexchange.com/q/66377/147640 – GSerg Nov 26 '15 at 11:30
  • Actually I am looking for the command which is properly run through php script and save the image in my destination path. imagegrabscreen(); work only in window but not in ubuntu – RajeshPalande Nov 26 '15 at 11:47

0 Answers0