Use wkhtmltoimage in php
<p>When I use wkhtmltoimage in terminal,it works well.
But it has some problem when used in php.
It is the problem:
The php code:</p>

<pre><code>&lt;?php
  $command = './wkhtmltoimage --width 164 --height 105 --quality 100 --zoom 0.2 http://www.google.com file/test.jpg';
  ob_start();
  passthru($command);
  $content = ob_get_clean();
  echo $command;
  echo $content;
?&gt;
</code></pre>

<p>It works.And when I try the same command in terminal,it works well too.</p>

<p>But when I try other links,it can't work well.</p>

<pre><code>&lt;?php
  $command = './wkhtmltoimage --width 164 --height 105 --quality 100 --zoom 0.2 http://codante.org/linux-php-screenshot file/test.jpg';
  ob_start();
  passthru($command);
  $content = ob_get_clean();
  echo $command;
  echo $content;
?&gt;
</code></pre>

<p>It does work.But when I try same command in terminal.It works!
Plz help me.</p>
