title: Can't get shell_exec to download a file
body: <p>I have a multithreaded cli downloader for ubuntu called Aria2c.</p>
  
  <p>I've been trying to get a php script to run aria2c and download a file using shell_exec, but i can't seem to get it to work. Ultimately I plan to have an input box on a page where I can enter a link and aria would download it.</p>
  
  <p>Here's the code I've come up with (for now im inputting the link manually):<br>
  <code>&lt;?php $dl = shell_exec('aria2c -d /home/user/ www.downloadlink.com'); ?&gt;</code></p>
  
  <p>Note that the aria2c command I specified works well in the shell; and the directory I'm attempting to download to is set to '777'. </p>
  
  <p>I'm baffled as to why it's not working, any ideas?</p>
  
  <p>PS: I prefer to use aria rather than the alternatives because it is multithreaded and it supports cookies.</p>