there is an example in the manual (there are examples for many things):
http://www.mikrotik.com/docs/ros/2.8/ip ... .main.11.3
Modify login page of the HotSpot servlet to redirect to the external authentication server. The external server should modify RADIUS database as needed
Here is an example of such a login page to put on the HotSpot router (it is redirecting to https://auth.example.com/login.php, replace with the actual address of an external authentication server):
<html>
<title>...</title>
<body>
<form name="redirect" action="https://auth.example.com/login.php" method="post">
<input type="hidden" name="mac" value="%mac%">
<input type="hidden" name="ip" value="%ip%">
<input type="hidden" name="user" value="%user%">
<input type="hidden" name="link-login" value="%link-login%">
<input type="hidden" name="link-orig" value="%link-orig%">
<input type="hidden" name="error" value="%error%">
</form>
<script language="JavaScript">
<!--
document.redirect.submit();
//-->
</script>
</body>
</html>
etc. there is more