Screenshot function added for PHP