Im using the find mac-address example found on this page -
http://wiki.mikrotik.com/wiki/API_PHP_package
Only thing changed was the require_once line.
I receive this error when loading the page -
Parse error: parse error, expecting T_CONSTANT_ENCAPSED_STRING' or ‘(’’ in C:\Inetpub\wwwroot\mac.php on line 2
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
Your MAC address<?php try { //Adjust RouterOS IP, username and password accordingly. $client = new RouterOS\Client('xxxx', '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.”;
}
?>
Anyone have an idea or a direction I should be looking?