I am trying to get the SSID from a Linux machine with PHP, but with shell_exec values between quotes seem to be ignored.
In the cli the result of iwgetid is:
wlan0 ESSID:"test"
However if I do the same with PHP using shell_exec:
$ssidInfo = shell_exec("iwgetid");
I get the following result:
wlan0 ESSID:
Is there a way to work around this?