I’m currently trying to set HTML content to a file on my Mikrotik. But actually it is not working. I’m able to set simple content but it is not possible to set HTML as content.
I’m executing it like that
I were not able to transfer that to the box.
So I **str_replace()**d \n with nothing… So I loose my formatting of the code (which is not good - but I can live with it if necessary) but I’m able to transfer it . Of course I prefer the new lines to be in the code - but at that moment I’m not sure how to solve it.
Thanks .
I did not walk through the code… It would have been better if I did that.
Just the question what’s an ideal delimiter instead of \n - because there are many chars that could be in a HTML… hm .
there is no need additional delimiter in API as is there for this purpose
what you do is you send correctly encoded length of sting you are going to send and then string itelf .
basically this: <0x00>
or: <0x00>
RouterOS will read the length and then expect that number of bytes to follow. In that string RouterOS will look for command name (/ip/address/print) or attribute (=comment=yadayada) where after == you can place whatever bytes you like while they are accepted by the argument.