Browse Source

codeclimate updated, new example added

tags/0.7 0.7
Paul Rock 7 years ago
parent
commit
2350bee242
  1. 4
      .codeclimate.yml
  2. 18
      examples/queue_simple_print.php

4
.codeclimate.yml

@ -1,3 +1,3 @@
excluded_paths: excluded_paths:
- "examples/"
- "tests/"
- "examples/"
- "tests/"

18
examples/queue_simple_print.php

@ -14,13 +14,17 @@ $client = new Client([
'pass' => 'admin' 'pass' => 'admin'
]); ]);
// Build query
$query = new Query('/ip/address/print');
$ips = [
'192.168.1.1',
'192.168.1.2',
'192.168.1.3',
'192.168.1.4',
'192.168.1.5',
'192.168.1.6',
];
for ($i = 0; $i < 100; $i++) {
// Send query to RouterOS
$response = $client->write($query)->read();
foreach ($ips as $ip) {
$query = new Query('/queue/simple/print', ['?target=' . $ip . '/32']);
$response = $client->wr($query);
print_r($response); print_r($response);
} }
$query = new Query('/queue/simple/print');
Loading…
Cancel
Save