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');