diff --git a/examples/export.php b/examples/export.php new file mode 100644 index 0000000..b084f9d --- /dev/null +++ b/examples/export.php @@ -0,0 +1,25 @@ +set('host', '192.168.1.3') + ->set('pass', 'admin') + ->set('user', 'admin'); + +// Initiate client with config object +$client = new Client($config); + +// Build query +$query = new Query('/export'); + +// Send query and read answer from RouterOS +$response = $client->write($query)->read(false); +print_r($response); diff --git a/examples/system_packag_print.php b/examples/system_package_print.php similarity index 87% rename from examples/system_packag_print.php rename to examples/system_package_print.php index 6200e3c..074679a 100644 --- a/examples/system_packag_print.php +++ b/examples/system_package_print.php @@ -18,11 +18,11 @@ $config = $client = new Client($config); // Build query -$query = new Query('/system/package/getall'); +$query = new Query('/system/package/print'); // Send query to RouterOS $request = $client->write($query); // Read answer from RouterOS -$response = $client->read2(); +$response = $client->read(); print_r($response);