title: How do I get the progress of an rsync run by a php exec command
body: <p>I have a shell script (rsync.sh) with an rsync command in it:</p>
  
  <blockquote>
    <p>rsync -rtlv --password-file=/path/to/password/file/file.txt --bwlimit=5000 /local/root/path/$1 username@remoteserver::remote/root/path/$2</p>
  </blockquote>
  
  <p>I then run that from PHP (rsync.php) with an exec command:</p>
  
  <blockquote>
    <p>exec('/path/to/shell/script/rsync.sh local/specific/path/ remote/specific/path/', $progress, $errors);</p>
  </blockquote>
  
  <p>This all works fine.  I get the progress once it's finished and I parse it.  So far I've only been testing on a few smaller files.  However, once this is put into production I am expecting this to be done on several large files that will take over an hour to finish.  I would like to be able to view the progress as it's happening.  If I put the --progress flag in there I'm not sure exactly how I'll get the progress back through the exec.  Any ideas?</p>
  
  <p>I think I'll have to make the exec asynchronous and somehow post the progress to a database where it can be collected and displayed.  </p>