Audiovox P965 Arkusz Danych Strona 135

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 280
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 134
Api php template
132
Api php template
This is a php template for working with RouterOS v3 API.
Requirements
1. It uses the php api Class found here : link API_PHP_class
[1]
.
2. It is presented first in the forum here link Forum_link
[2]
3. overLIB popup JavaScript library is required for this and its included in the files (zip file) or can be found here:[3]
Connected Clients (from the registration table)
<?php
require('routeros_api.class.php');
$API = new routeros_api();
$API->debug = false;
if ($API->connect('192.168.1.2', 'api', 'api1234')) { // Change this as necessery
$API->write('/interface/wireless/registration-table/print',false);
$API->write('=count-only=');
$READ = $API->read(false);
$ARRAY = $API->parse_response($READ);
echo "Number of connected clients:" . substr($READ[1],5);
$API->disconnect();
}
?>
Resources (cpu/mem/disk/version)
<?php
require('routeros_api.class.php');
$API = new routeros_api();
$API->debug = false;
Przeglądanie stron 134
1 2 ... 130 131 132 133 134 135 136 137 138 139 140 ... 279 280

Komentarze do niniejszej Instrukcji

Brak uwag