I am just wondering (since I do not have my unix platform to test) if I executed a multi command line via the shell_exec()
on PHP, am I already safe to close the browser without waiting for it to finish?
Because as far as I know, wget
will keep downloading the file (that's why it is favorable than cURL for unstable and slow network).
For now I am very worried that my downloads will be interrupted and cross checking each file whether it was completed or not will arise more work.
Look at this multiline command my PHP is generating: As of now, it waits for downloads to finish
wget "hxxp:// - 01 [480p][TSR][AKS].mkv" --user=root --password=pw --directory-prefix="download here" -nc 2>&1 && wget "hxxp:// - 01 Preview [480p][TSR][AKS].mkv" --user=root --password=pw --directory-prefix="download here" -nc 2>&1 && wget "hxxp:// - 02 [480p][TSR][AKS].mkv" --user=root --password=pw --directory-prefix="download here" -nc 2>&1 && wget "hxxp:// - 02 Preview [480p][TSR][AKS].mkv" --user=root --password=pw --directory-prefix="download here" -nc 2>&1 && wget "hxxp:// - 03 [480p][TSR][AKS].mkv" --user=root --password=pw --directory-prefix="download here" -nc 2>&1 && wget "hxxp:// - 03 Preview [480p][TSR][AKS].mkv" --user=root --password=pw --directory-prefix="download here" -nc 2>&1 && wget "hxxp:// - 04 [480p][TSR][AKS].mkv" --user=root --password=pw --directory-prefix="download here" -nc 2>&1 && wget "hxxp:// - 04 Preview [480p][TSR][AKS].mkv" --user=root --password=pw --directory-prefix="download here" -nc 2>&1
then echo
the output via:
$output = shell_exec($exec);
echo $exec.'<br /><pre>'.$output.'</pre>';`
I am willing to drop the 2 lines above as long as I know that the multiline command will be executed in the background even I close the PHP script.
Hope somebody can give their insight or suggestion.
Thanks!