wget not working when called from exec() or shell_exec()
<p>I am trying to integrate a wget command I have written into a php script.  The command recursively downloads every html/php file on a website (which is required functionality that I haven't found in file_get_contents()).  I have tested the wget command in a terminal window, but when executing it using either exec() or shell_exec() nothing happens.  I don't get any errors, or warnings.</p>

<p>Here is the command in question, </p>

<pre><code>wget --recursive -m --domains oooff.com --page-requisites --html-extension --convert-links -R gif,jpg,pdf http://www.oooff.com/
</code></pre>

<p>I have tried simple wget commands (not as many parameters) from exec(), and shell_exec(), but they also don't work.</p>

<p>If wget isn't an option, I am open to using some other method of downloading a website in it's entirety.</p>

<p>My code that I have now is,</p>

<pre><code>exec("wget google.com", $array);
</code></pre>

<p>Then when printing the array it is empty</p>