You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

24 lines
505 B

<?php
require_once __DIR__ . '/../vendor/autoload.php';
error_reporting(E_ALL);
use \RouterOS\Config;
use \RouterOS\Client;
use \RouterOS\Query;
// Create config object with parameters
$config =
(new Config())
->set('host', '127.0.0.1')
->set('pass', 'admin')
->set('user', 'admin')
->set('ssh_port', 22222);
// Initiate client with config object
$client = new Client($config);
// Execute export command via ssh
$response = $client->export();
print_r($response);