title: Mikrotik api for php IP Bindings
body: <p>so i have this code</p>
  
  <pre><code>&lt;?php
  require('routeros_api.class.php');
  include 'include/global.php';
  include 'include/function.php';
  
  $username = $_GET['user'];
  
  $sql    = "SELECT user_macaddress FROM demo_user WHERE user_name='".$username."'";
  $result1    = mysql_query($sql);
  $mac        = mysql_fetch_array($result1);
  
  $API = new RouterosAPI();
  
  $API-&gt;debug = true;
  
  if ($API-&gt;connect('192.168.88.1', 'admin', '1')) {
  
      $API-&gt;write('/ip/hotspot/ip-binding/add',false);
      $API-&gt;write('=type=bypassed',false);
      $API-&gt;write("=mac-address='".$mac."'",true);
      $READ = $API-&gt;read();
      $API-&gt;disconnect();
      ob_clean();
      header("location:http://google.com");
  
  }
  
  
  ?&gt;
  </code></pre>
  
  <p>i use the php api for mikrotik for add the mac address automatically, but the mac address never shown in my ip bindings in winbox. can u guys help me with this?</p>