<?php
include "../../config/api_mik.php";

require('../routeros_api.class.php');

$API = new RouterosAPI();

$API->debug = true;

if ($API->connect2($m_ip, $m_user, $m_pass, $m_port)) {


				$arrID=$API->comm("/ip/firewall/nat/getall", 
				              array(
					          ".proplist"=> ".id",
					          "?dst-port" => $m_remote ,
					          ));

				$API->comm("/ip/firewall/nat/set",
					  array(
						   ".id" => $arrID[0][".id"],
						   "to-addresses"  => "192.168.100.100",
						   )
					  );

				$API->disconnect();

				}

echo "<pre>";
print_r($arrID);
echo "</pre>";

?>
