After playing around with API I have decided to work with ssh, using ssh2_shell. Executing scripts works fine, a bit more tricky is with report, and here is one question for you guys: How I can read Flags from array?
For example, If I wanna get list of users I`ll simple ran
Code: Select all
explode(';', conn_exec(":put [/user print as-value]"));
Output would be array
Code: Select all
Array (
[0] => .id=*1
[1] => comment=
[2] => name=admin
[3] => group=full
[4] => address=0.0.0.0/0
[5] => .id=*2
[6] => comment=
[7] => name=some_other_user
[8] => group=full
[9] => address=0.0.0.0/0
...
Thank you.
Strahinja