Menu
  • HOME
  • TAGS

Screenshot of website using PHP

php,screenshot,wkhtmltoimage

Ok finally executed the shell command through php via browser. So i thought i could share might be useful for someone. So the real problem is permission. So when i used whoami command on terminal output was macuser. But when i tried executing the command using shell_exec in php output...

wkhtmltopdf - Spaces in URL

php,url,wkhtmltopdf,url-encoding,wkhtmltoimage

You have to escape your arguments, else you have a huge security hole in your code: $url = escapeshellarg($_GET['url']); // Website URL to Create Image $name = escapeshellarg($_GET['img']); // Output Image Name $command = "/usr/local/bin/wkhtmltoimage --no-images --crop-w 580"; $dir_img = "images/"; // Image files will be saved here $ex_cmd =...

How do I convert Protocol Relative URLs to standard HTTP?

ruby-on-rails,ruby,replace,wkhtmltoimage

You can use perl for that : perl -pi -e 's/src="\/\//src="http:\/\//' * This statement above will replace all patterns found in a directory....