API PHP Mikrotik + MySQL Database

hey i have any question

API PHP Mikrotik can conect to mysql database??
i have project make system managemen user…this graph my project

system===>mysql database<===Mikrotik

im very confused here, can API PHP Mikrotik read my database user?
im not talking about radius server

sorry bad english :smiley:

MikroTik’s API protocol is about letting other languages, including PHP, access the router. It does not allow the router itself to do anything extra.

PHP can access a MySQL database on its own, without the need for a MikroTik API client. See the mysqli extension.

So… what you can do is use PHP as a “bridge” between MySQL and MikroTik, since it can access both. The flow of events will be more akin to

PHP ==(accesses)==> MySQL
MySQL ==(replies)==> PHP
PHP ==(accesses)==> MikroTik
MikroTik ==(replies)==> PHP

or perhaps vice-versa, i.e.

PHP ==(accesses)==> MikroTik
MikroTik ==(replies)==> PHP
PHP ==(accesses)==> MySQL
MySQL ==(replies)==> PHP

It’s also important to note that you can’t authenticate hotspot users via the API protocol. You can add/edit/remove users, but the actual authentication process can still only be performed by a hotspot web page sitting at the router itself, to which users connect via their browser.

have this can anyone help me add value to mysql

\

<?php // Date in the past header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // always modified header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // HTTP/1.1 header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); // HTTP/1.0 header("Pragma: no-cache"); ?> Mikrotik signal list <?php \ \ $ip="172.17.19.151"; //Change IP to your host names, address $mask_mac=false; //Use to mask MAC adress (true / false ); \ \ $tx_bytes_snmp = snmpwalkoid("$ip", "public", ".1.3.6.1.4.1.14988.1.1.1.2.1.3");

if (is_array($tx_bytes_snmp))

foreach ($tx_bytes_snmp as $indexOID => $rssi)
{
$oidarray=explode(“.”,$indexOID);
$end_num=count($oidarray);
$mac=“”;

for ($counter=2;$counter<8;$counter++)
{
$temp=sprintf(‘%02x’, $oidarray[$end_num-$counter]);

if (($counter <5) && $mask_mac)
$mac=“:xx$mac”;
else if ($counter==7)
$mac=“$temp$mac”;
else
$mac=“:$temp.$mac”;
}


$mac_oiu = substr(str_replace(“:”,“-”,$mac),0,8);
$mac=strtoupper($mac);
?>

<?php } else { ?> <?php } ?>
MAC Signal
strenght(dBm)
<?php echo ($mac); ?> <?php echo ($rssi); ?>
Please check SNMP settings and IP address