Hello ,
wanted to know if I can send a URL command to a device using the router?
Thanks ,
Hello ,
wanted to know if I can send a URL command to a device using the router?
Thanks ,
/tool fetch mode=http port=80 url=http://ip.add.re.ss/action
Thanks.
but what to do if in the command I have “?”.
it won’t let me use it …
even if I use " "
any solution for this?
Try to escape the character with .
Like ?
http://wiki.mikrotik.com/wiki/Manual:Scripting#Constant_Escape_Sequences
See lots of script in wiki.
http://wiki.mikrotik.com/wiki/Manual:Scripting-examples
Like lots of them for dyndns update.
Search for them in forum.
http://forum.mikrotik.com/search.php?keywords=dyndns
put the \ only on CLI, when used on script do not put any \ and DO NOT replace any symbol with “url escaped” character like ? = \3F.
On URL remember the quotas ":
On CLI:
/tool fetch mode=http port=80 url=“http://ip.add.re.ss/action.php?parameter=value¶meter2=value2”
On Script
/tool fetch mode=http port=80 url=“http://ip.add.re.ss/action.php?parameter=value¶meter2=value2”
But with this you can transmit only GET type of command,
If you need to transmit the parameters by POST method (like when press submit on this forum), instead to GET in the URL, you can not do that.