I'm using a script to get files from my server. I'm using aria2 to download the files quickly and it works great but is there a way when the script is running to output what is happening in the command.
For example when you run this command via command line you get updates every couple of seconds
$output = shell_exec('aria2c http://myserver.com/myfile.rar');
echo "<pre>$output</pre>";
I get these outputs:
[#f6a7c4 9.5MiB/1.7GiB(0%) CN:15 SD:5 DL:431KiB ETA:1h9m9s]
[#f6a7c4 52MiB/1.7GiB(2%) CN:23 SD:7 DL:0.9MiB ETA:30m19s]
[#f6a7c4 141MiB/1.7GiB(8%) CN:26 SD:4 DL:1.7MiB ETA:15m34s]
The script only shows me this data once it has finished executing, Which can be upto 5+ minutes so i would like to know whats going on if possible?
Ive tried adding the following:
ob_start();
--Get URL for Files and show URL on screen
ob_flush();
--Start downloading file
ob_flush();
Thanks