I’m trying to run rate -c 192.168.122.0/24 command on my Centos computer and write down the output of that command to the text file using shell_exec('rate -c 192.168.122.0/24') command; still no luck!!
I’m trying to run rate -c 192.168.122.0/24 command on my Centos computer and write
Share
As you forgot to mention, your command provides a non ending output stream. To read the output in real time, you need to use popen.
Example from PHP’s website :
You can read the process output just like a file.