Please help. I am new at mikrotik api, but after reading a bit, I managed to set an API however is not working as expected.
I am able to send sms using the function sms_send($number, $text)
On my api I have something like:
$API->sendSync(new Request(“/tool sms send port=usb1 channel=2 phone-number=$number message=$text”));
But if the variable $text contains any space, the message won’t be sent, it sends only without spaces. Can you help me with that?
If the argument values contain any sort of variables, don’t use the Request constructor to set them. Use its “setArgument()” method. With it, everything in the value is treated as part of the value itself, be it spaces, quotes, “=” or anything else.