Audiovox P965 Ficha Técnica Página 59

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 280
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 58
API PHP package
56
//Adjust RouterOS IP, username and password accordingly.
$client = new RouterOS\Client('192.168.0.1', 'admin', 'password');
$printRequest = new RouterOS\Request('/ip arp print .proplist=mac-address');
$printRequest->setQuery(
RouterOS\Query::where('address', $_SERVER['REMOTE_ADDR'])
);
$mac = $client->sendSync($printRequest)->getArgument('mac-address');
if (null !== $mac) {
echo 'Your MAC address is: ', $mac;
} else {
echo 'Your IP (', $_SERVER['REMOTE_ADDR'],
") is not part of our network, and because of that, we can't determine your MAC address.";
}
} catch(Exception $e) {
echo "We're sorry, but we can't determine your MAC address right now.";
}
?>
</h1>
</body>
</html>
References
[1] http:/ / pear2. github. com/ Net_RouterOS/
[2] http:/ / forum. mikrotik. com/
[3] http:/ / www. gnu. org/ copyleft/ lesser. html
Vista de página 58
1 2 ... 54 55 56 57 58 59 60 61 62 63 64 ... 279 280

Comentários a estes Manuais

Sem comentários