From fed455cc7653509a74799b375823a943606ae059 Mon Sep 17 00:00:00 2001 From: Paul Rock Date: Fri, 19 Jun 2020 00:41:12 +0300 Subject: [PATCH] Note about export method added to readme --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 04e8fe2..a79d76a 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,25 @@ $response = $client->query($query)->read(); var_dump($response); ``` +If you need export all settings from router: + +```php +use \RouterOS\Client; + +// Initiate client with config object +$client = new Client([ + 'host' => '192.168.1.3', + 'user' => 'admin', + 'pass' => 'admin', + 'ssh_port' => 22222, +]); + +// Execute export command via ssh, because API /export method has a bug +$response = $client->export(); + +print_r($response); +``` + Examples with "where" conditions, "operations" and "tag": ```php