The servlet pages have a number of variables accessible to them such as the radius variables.
I have a script that runs on login and was wondering if there was any way for the script to get at these variables.
Alternatively is it possible for the servlet page to set a global variable or write to a location that the script can access?
I’m working on a fair usage policy for hotspot users that is based on their daily use, so on login I need to get the user’s time connected and bytes in/out for the current day. This data is stored on the Radius server and I was hoping that I could get Radius to include it in the login response so that I could get at it.
I realise I can use the fetch command and a simple php page to get this data, but I was trying to find a way to do it that doesn’t involve making a separate request in order to keep network traffic to an absolute minimum.
Use an external web server with a dynamic scripting language for the login pages to do whatever you like. You can also make API calls from there to influence router configuration.
Depending on what you need the variables for you can use http://wiki.mikrotik.com/wiki/Manual:Customizing_Hotspot variables returned from RADIUS for display to the user, but the web pages displayed by the servlet cannot otherwise interact with the router. Other router functions cannot access those variables.