this results the same
tool fetch address=“www.some.com” src-path=“/something.hr/mt/update.php?u=1&p=b9fedbb1b5952500c58208097c808db1&d=7&i=0.0.0.0&s=x86&v=ver&t=yyyy-mm-dd hh:mm” mode=http
And allso, is there a way to read the file?
The php file enters the information into SQL and if successful, returnd character 1 (or 0 if unsuccessful)
so i can do something if returned 0 or 1?
I’ve seen cases where if the return data is empty /tool fetch would hang and continue “downloading” for a long time. Just ensure (maybe through a packet capture), that data is in fact being returned from the server.
To read the data returned by the server, set dst-path=. If the return data is < 4095 bytes, you can read it inside RouterOS by using:
It used to work but i accidentaly deleted the script 8-(
If i enter the URL in a browser, i get exactly what i need.
when i break the download (after waiting for a long time) i get the error ‘no such item’
could you try fetching this:
/tool fetch address=“www.giganet.hr” src-path=“/avatars/tp-avatar.png” mode=http dst-path=“tp-avatar.png”
I get a 404 error
and since i will delete the record in sql, try this too:
/tool fetch address=“www.giganet.hr” src-path=“/giganet.hr/mt/update.php?u=1&p=b9fedbb1b5952500c58208097c808db1&d=7&i=w.x.y.z&s=x86&v=ver&t=yyyy-mm-dd hh:mm” mode=http dst-path=“phpresult”
this hangs and when interrupted, ‘no such item’ error is returned
I am also getting a 404 error still. I can get the image with a browser, so it must be with the fetch routine. I suggest contacting support@mikrotik.com and see what they say.
I just tried a php file fetch from my site and it downloaded the output of the php file, not the actual file.
ADD: You might want to check your file and directory permissions on the /avatars/ directory and see if anything is different from your main directory also.