hello i put the following script to dhcp lease scripts according to this manual https://wiki.mikrotik.com/wiki/Manual:IP/DHCP_Server
/tool fetch url=("http://10.10.10.1/add.php?clienthostnam ... easeActMAC")
which is working perfect from server side BUT this weird happens:
at log output window i get mac correctly and as clienthostname i get -hostname which of course is parsed to database as client name and is wrong.
i understand that i must parse variables another way so i try to parse it as follows:
/tool fetch url=("http://10.10.10.1/add.php?clienthostname=" . $lease-hostname . "&mac=" . $leaseActMAC) and it gives me an empty client name but mac address is ok which of course again it parses only mac address on database and leaves hostname empty.
even if i change the order of mac and client name the client name remains empty.
would it be me and the way i use to handle this specific variable or it does not want to give host name?