Community discussions

MikroTik App
 
Eduardo
newbie
Topic Author
Posts: 45
Joined: Thu Aug 18, 2016 12:20 pm

Problem opening URL with fetch command

Wed Aug 31, 2016 11:27 pm

Hi,

I am using Cloudns.com for my dynamic DNS.

Updating the dynamic DNS consists of a very simple (fixed) URL that needs to be openend. However, I can't get it to work from my CRS125...

Even a simple
/tool fetch address="https://www.google.com" mode=https keep-result=no
gives
invalid value for argument address:
while resolving ip: name does not exist
I did read the explanation on http://wiki.mikrotik.com/wiki/Manual:Tools/Fetch
and my DNS is configured fine (ping http://www.google.com works from the terminal window)

so... HELP! :-)
 
Eduardo
newbie
Topic Author
Posts: 45
Joined: Thu Aug 18, 2016 12:20 pm

Re: Problem opening URL with fetch command

Fri Sep 02, 2016 12:11 am

Nobody? :-/
I just need a command to open a website...

Thanks
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26822
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Problem opening URL with fetch command

Fri Sep 02, 2016 1:05 pm

In the same manual you can see that "address" is for IP address and you should be using url and path instead.
And your URL needs a filename, you can't request the whole site.

This would work:
[admin@sviests] > /tool fetch url="http://www.google.com/file.pdf" mode=http        
 
Eduardo
newbie
Topic Author
Posts: 45
Joined: Thu Aug 18, 2016 12:20 pm

Re: Problem opening URL with fetch command

Fri Sep 02, 2016 2:17 pm

Thanks for your reply. I did also try url and path, but couldn't get it to work.
And your URL needs a filename, you can't request the whole site.
Now that is a problem, because there is no filename.

The "whole site" is actually just 2 characters ("OK"). So there is no way to request this website?
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7169
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Problem opening URL with fetch command

Fri Sep 02, 2016 2:25 pm

Specify full path with url= parameter. Fetch will download file with your OK, even if URL does not contain any actual filenames.
 
Eduardo
newbie
Topic Author
Posts: 45
Joined: Thu Aug 18, 2016 12:20 pm

Re: Problem opening URL with fetch command

Fri Sep 02, 2016 3:04 pm

Fantastic, it's working now!

Thanks!

Who is online

Users browsing this forum: michalczysz and 19 guests