I'm really new to php And i have written this code to grab data from Mikrotik's Wireless Registration Table Full Code
<?php
use PEAR2\Net\RouterOS;
require_once 'PEAR2_Net_RouterOS-1.0.0b6.phar';
try {
$client = new RouterOS\Client('mikrotikIP', 'User', 'PW');
} catch (Exception $e) {
die($e);
}
// Ambil List Registration Table
$getWlRegtable = $client->sendSync(new RouterOS\Request('/interface wireless registration-table print'));
foreach ($getWlRegtable as $getWlRegtable){
if($getWlRegtable->getType() === RouterOS\Response::TYPE_DATA) {
echo 'Interface : ', $getWlRegtable->getProperty('interface'), "<br>";
And the question is,based on the code,how can i post the output of the echos to MySQL DB. I'm really new to this DB and PHP stuff. And sorry for my bad english. Thanks.