php - How to view process output with PID ? (proc_open) ← (PHP)

one text

edited:

goal:

I have an application written in Python that can download videos from web pages! (auto detect video link in youtube or other video site)

When I run it in CMD , Runs well and shows the download speed and remined time.

Now I want to make a video downloader site.(LIKE https://dredown.com). Users enter page link to site.

Wait for it to download.

I want to see the speed and download time.

Question:

I've used the proc_open and I run the command

For example, continuously ping

ping 192.168.1.1 -t

Pid value gained by using the proc_get_status function

for example PID=4521

after one hours i want see output again !!! (because The process is still running)

Is is possible:

(pipe to process with PID) or (recreate the resource with the only id)

function like this : pcntl_waitpid($pid) that give pid and control it ! i want see output only !

Source