http://php.net/manual/en/language.operators.execution.php
Note that the PHP executable user must have permissions to execute the script.
explode the result on the line breaks, then take the 3’th element and explode it on the space character and take the 3’th element.
Just for readability sake i’d pull the variable out of the string echo $rssi." dBm";
but thats just me.
Looks good to me; the numbers may need adjusting as I’m not… entirely sure if that first line of the output is ‘actually there’ or it’s an artifact of the command line… so you may need to print_r($lines) to see what index to use.