I’m using a RouterBOARD 133 running Router OS 3.7 using license level 4.
I need to write a script that runs when the user clicks a button on a web page.
The script needs to be able to capture the MAC Address of the user that clicked the button on a web page, and record the date and time that the user clicked the button. Then I want that recorded information spit out into a database.
The script is for some wireless authentication management and statistics stuff we’re doing.
My questions are:
What do I need to write that script/can someone help me write it?
How can I trigger the script on the MicroTik to run on button click on a web page running on the MikroTik?
How do you think router will know what user is doing on his PC? You can capture and examine packets sent from users PC, probably it will help, but you can’t do it by writing a script in RouterOS.
Could I do something like when the user clicks a button it pushes up a specific value, then set the logs to log that value. The script could run every 10 min or so, scan the script for that specific log value and correlate the log value with that ip’s mac address and then push that data to a database?
if you’re using Hotspots, then i guess that you’re pushing pages at the clients regularly, with a button to click.
Best bet (if that is the case) might be to use a page on the router as the advert page, and make it redirect to somewhere ‘proper’ after substituting the user’s MAC address as part of the URL/POST, e.g. :-