pear2 /
Net_RouterOS
| 1 | <?php |
||
| 2 | use PEAR2\Net\RouterOS; |
||
| 3 | |||
| 4 | require_once 'PEAR2/Autoload.php'; |
||
| 5 | |||
| 6 | $util = new RouterOS\Util( |
||
| 7 | $client = new RouterOS\Client('192.168.88.1', 'admin', 'password') |
||
| 8 | ); |
||
| 9 | $util->setMenu('/system identity'); |
||
| 10 | |||
| 11 | //echoes "MikroTik", assuming you've never altered your router's identity. |
||
| 12 | echo $util->get(null, 'name'); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 13 |