Community discussions

MikroTik App
 
richedav
Member Candidate
Member Candidate
Topic Author
Posts: 114
Joined: Mon Dec 13, 2010 12:13 am

Fetch to variable

Tue Nov 15, 2011 5:16 pm

Hi

Im dashboardifing our Mikrotik hotspots so they can pull some basic information down from a cloud based admin system (such as SSID) and whilst I had this working fine , Fetch was writing a file each time which I am keen to remove.

Im trying to simply get a one work line back from the HTTP server and store it straight into a variable - any ideas if this is possible, and if so, what I may be doing wrong?
:global content [/tool fetch url="http://dashboard.domain.com/checkin.php?ssid=$oldssid"  keep-result=no   mode=http]
:put "content=$content"
$content remains empty
 
User avatar
TealFrog
just joined
Posts: 23
Joined: Sun Oct 02, 2011 11:56 am

Re: Fetch to variable

Wed Nov 16, 2011 4:02 am

Hello,

From my testing it doesn't look like it will work by assigning the content directly to a variable. Based on the information at this link, http://forum.mikrotik.com/viewtopic.php ... le#p277919 it would appear that it confirms these findings.

Regards.
 
richedav
Member Candidate
Member Candidate
Topic Author
Posts: 114
Joined: Mon Dec 13, 2010 12:13 am

Re: Fetch to variable

Wed Nov 16, 2011 10:39 am

I was pretty sure it wasn't possible, which is a shame.

I'll stick to writing to a file then - If i only send a reply from the HTTP server when it has something for the router/AP then I just have to figure out how to stop the MT saving a zero length wget reply to a file.

Who is online

Users browsing this forum: No registered users and 26 guests