php - How to set exec result to an array? -
how can save exec result array or list, , show result php?
exec('./script.sh'); this script contains list of ips.
the content of script following:
echo nmap -sp 192.168.2.0/24 | cut -d "i" -f1 | cut -d " " -f2 | grep 192.168.2.*
thanks!
$result = []; exec('./script.sh', $result); var_dump($result);
Comments
Post a Comment